accessibility-guidelines icon indicating copy to clipboard operation
accessibility-guidelines copied to clipboard

Ambiguity re. whether and how 1.4.2 'Page title' applies to native mobile apps

Open jfhector opened this issue 5 years ago • 4 comments

This ambiguity / lack of clarity was raised by @robert-kinder in a related conversation.

Here's my summary of the situation, and of the decision that we need to make:

  • Web pages should have a main heading (using the <h1> element), as well as a page title (using the <title>) element. The main heading is visible on the page. The title is visible on the browser tab, and is announced by screen readers. This is what allows screen reader users to orientate between the tabs of their web browsers.

  • WCAG SC 1.4.2 has been written for web pages (back in early 2000s when native mobile apps didn't exist). And its only requirement is about the <title> of a web page.

  • 1.4.2 says nothing about what the main headings of a web page should be. But it's convention and best practice for the <h1> and the <title> to mirror each other – with the exception that the <title> should also indicate the name of the website/service. @robert-kinder has documented an example of how the content of h1 and of title should compare.

  • It's not 100% clear whether and how 1.4.2 applies to native mobile apps. Some people say that the WCAG apply to native apps (with a bit of interpretation/adaptation). Some people say that the WCAG don't apply.

  • But the new UK public sector procurement law will apply the WCAG to native apps started June 2021. So my opinion is that, when a WCAG Success Criterion translates well to native mobile, we should apply it there too.

  • In the case of 1.4.2, there's an ambiguity: the Success Criteria's only requirement is for the title of a document (i.e. <title> for a HTML page, or equivalent for a PDF or Word document). It doesn't say anything about what the main heading of a page should be. So maybe, yes, we should make this 'web only'.

  • But at the same time, I'm imagining that for a native mobile app, the equivalent of <title> would be the title that appears in the navigation bar at the top of the screen. I'm imagining that, on native mobile app, the title that appears in the navigation bar at the top of the screen serves the same purpose as <title> and <h1> at the same time. So I'd like to investigate further.

@KaneCheshire @geftimov @amryousef-tab what are your thoughts?

jfhector avatar Jan 02 '20 12:01 jfhector

on native mobile app, the title that appears in the navigation bar at the top of the screen serves the same purpose as <title> and <h1>

As you correctly mentioned here @jfhector the title on the appbar/toolbar is the main thing here. It should always be visible and announced first by screen readers for accessibility. Same as what WCAG states really.

amryousef-tab avatar Jan 06 '20 10:01 amryousef-tab

@jfhector - Feels like we're going in circles here (ref issue #82 ).

  • #82 states that 2.4.2 is definitely applicable to mobile apps
  • As discussed, HTML has two tags/labels/functions (<title> and <h1>) where native apps only have one.

So it seems logical to call out the nuanced difference between <title> and <h1> as web only. Right?


Specifically, can this simply be resolved by stating that the following 'common mistake' on 2.4.2 is web only (changing the text as suggested here)?

The title does not indicate the page is part of a service on Gov.UK;

This could be called out in either the common mistake section, or in the guidance for web section.

robert-kinder avatar Jan 08 '20 15:01 robert-kinder

I agree with your suggested fix.

One reason I've been slow to follow up on this, is that I've done a lot of designing and prototyping for how the detail pages could work. And I've reached the conclusion that Web, iOS and Android should be on separate version of each page (rather than the same page showing all three techs).

I'm experimenting with this a little bit more. (Specifically, I'm looking at a different process that'd allow to output different version of pages without repeating the same HTML markup, using a templating engine).

jfhector avatar Jan 08 '20 17:01 jfhector

Don't worry about it.

I've updated #97 moving the "Title should indicate..." requirement into the "Guidance for Web Section". Let me know what you think.

I also noticed the Guidance for Design section was very web focussed. I haven't changed anything yet but I'll see what I can do in the next few days

robert-kinder avatar Jan 10 '20 09:01 robert-kinder