Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are section elements in examples intended to be landmarks? #562

Closed
carmacleod opened this issue Dec 4, 2017 · 4 comments
Closed

Are section elements in examples intended to be landmarks? #562

carmacleod opened this issue Dec 4, 2017 · 4 comments
Labels
Feedback Issue raised by or for collecting input from people outside APG task force

Comments

@carmacleod
Copy link
Contributor

I'm not certain if the APG example pages intend to use ARIA landmarks or not.
For example, the Data Grid page: http://w3c.github.io/aria-practices/examples/grid/dataGrids.html
has 8 <section> elements that are not given an explicit label, therefore they are not recognized as landmarks by any screen reader that I tried (JAWS/Chrome/FF, NVDA/Chrome, VoiceOver/Safari).
To be recognized as landmarks, they need either an aria-labelledby or an aria-label.
Unfortunately, at this time, just having a heading child is not good enough to be recognized as a landmark. I don't know if the broken outline algorithm is the cause of this, but I suspect so.
So the 8 section elements on the Data Grids Example page would need to have aria-labelledby pointing to their heading child. I will submit a PR so that you can see what I mean.
I personally think these sections should be landmarks - it makes sense. However if that was not the intent, then they should be switched to divs instead of keeping as unlabelled sections.

carmacleod added a commit to carmacleod/aria-practices that referenced this issue Dec 4, 2017
Change-Id: I790cb1f9631c6d646c25695fbfd04efd390215a5
Signed-off-by: Carolyn MacLeod <[email protected]>
@mcking65
Copy link
Contributor

mcking65 commented Dec 6, 2017

@carmacleod commented:

I'm not certain if the APG example pages intend to use ARIA landmarks or not.

Not for the sections inside of main.

I personally think these sections should be landmarks - it makes sense.

The purpose of landmarks is not to represent the information architecture of a document. Doing so causes proliferation that reduces the value of landmarks. Headings are the best way of making IA accessible.

However if that was not the intent, then they should be switched to divs instead of keeping as unlabelled sections.

Sections with labels are landmarks and sections that do not have labels are not landmarks. That was one of the intents of the ARIA 1.1 restructuring of the landmark portion of the ontology. To the best of my knowledge, it is not inappropriate to have unlabeled sections.

I'd rather not change the sections to divs unless there really is some conformance reason to do so.

@mcking65 mcking65 added the Feedback Issue raised by or for collecting input from people outside APG task force label Dec 6, 2017
@mcking65 mcking65 added this to the 1.1 APG Release 1 milestone Dec 6, 2017
@mcking65
Copy link
Contributor

mcking65 commented Dec 8, 2017

@carmacleod, closing as answered. Please feel free to re-open if the resolution is not satisfactory.

@mcking65 mcking65 closed this as completed Dec 8, 2017
@carmacleod
Copy link
Contributor Author

carmacleod commented Dec 9, 2017

Hi @mcking65. Thanks for your feedback. I can't reopen, but I do have further comments.
I'm still confused about what unlabelled sections are useful for.
I think the specs are still a bit fuzzy in this area... possibly because nobody can agree on how sections and headings should fit together in an outline.

The HTML spec for section element says that the default role for section is region. The spec also contains the following 2 paragraphs:

Note: The section element is not a generic container element. When an element is needed only for styling purposes or as a convenience for scripting, authors are encouraged to use the div element instead. A general rule is that the section element is appropriate only if the element’s contents would be listed explicitly in the document’s outline.

Assistive Technology may convey the semantics of the section to users when the element has an explicit label. This information can provide a hint to users as to the type of content. For example the role of the element, which in this case is "region", can be announced by screen reader software when a user navigates to an section element. User Agents may also provide methods to navigate to section elements.

The HTML spec even has an example of section elements that have an aria-label.

The ARIA spec for region contains the following paragraph:

Authors MUST give each element with role region a brief label that describes the purpose of the content in the region. Authors SHOULD reference a visible label with aria-labelledby if a visible label is present. Authors SHOULD include the label inside of a heading whenever possible. The heading MAY be an instance of the standard host language heading element or an instance of an element with role heading.

Taken together, the HTML spec and the ARIA spec seem to say, "sections must have explicit labels".
Perhaps that is not the intended meaning, but that's the way I have read it.

@carmacleod
Copy link
Contributor Author

Hi @mcking65 - any comment on my comment?
I'd really like to iron this one out and see if I misunderstood the specs on this issue, or if one of them needs rewording.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feedback Issue raised by or for collecting input from people outside APG task force
Projects
None yet
Development

No branches or pull requests

2 participants