aria icon indicating copy to clipboard operation
aria copied to clipboard

Consider requiring user agents to calculate aria-level, aria-posinset, and aria-setsize when not declared by authors

Open mcking65 opened this issue 5 years ago • 9 comments

The proposed comment role includes the following language:

If the author has not explicitly declared aria-level, aria-posinset, or aria-setsize for a comment element, user agents MUST automatically compute the missing values and expose them to assistive technologies.

Currently, ARIA does not include a normative requirement for computing these properties when they are used on elements with other roles that support them. For example, the definition of aria-level includes the following language:

If the DOM ancestry accurately represents the level, the user agent can calculate the level of an item from the document structure. This attribute can be used to provide an explicit indication of the level when that is not possible to calculate from the document structure or the aria-owns attribute. User agent support for automatic calculation of level may vary; authors SHOULD test with user agents and assistive technologies to determine whether this attribute is needed. If the author intends for the user agent to calculate the level, the author SHOULD omit this attribute.

So, user agents are explicitly given a pass here. Let's consider changing this language to require calculation.

mcking65 avatar Feb 06 '20 21:02 mcking65

I'm all for it. But for role=heading this seems awfully close to the HTML5 Document Outline.

pkra avatar Feb 07 '20 08:02 pkra

aria-level is required on role=heading so this wouldn't apply there. If it is missing the error-correction technique is to supply aria-level=2

jnurthen avatar Feb 07 '20 21:02 jnurthen

Ah, my (lucky) mistake - thanks for reminding me, @jnurthen!

pkra avatar Feb 10 '20 08:02 pkra

aria-level is required on role=heading so this wouldn't apply there. If it is missing the error-correction technique is to supply aria-level=2

So the wording for requiring user agents to calculate aria-level will need to specifically mention not calculating on roles where it's a required attribute.

carmacleod avatar Feb 10 '20 15:02 carmacleod

Related: There's already some language in Core-AAM: https://w3c.github.io/core-aam/#mapping_additional_position

Proposal: Because calculating these things is NOT platform-specific mappings, the text belongs in the ARIA spec rather than the Core-AAM (imho). Therefore, it might make sense to use the wording there as a starting point to fix this issue for the ARIA spec. Having done so (and gotten it landed in the ARIA spec), then do a pull request to remove the language from the Core-AAM.

joanmarie avatar Feb 13 '20 18:02 joanmarie

@sinabahram will this be done in time for 1.3?

jnurthen avatar Mar 25 '21 16:03 jnurthen

I'm very sorry, but probably not. Personal and work is absolutely ridiculous right now. Again, apologies.

sinabahram avatar Apr 03 '21 22:04 sinabahram

VoiceOver assumes no level on headings when not supplied by an author, and just speaks "heading" not the more verbose "heading level 0" or the arbitrary "heading level 2." I would recommend against advising AT to verbosely convey info that the author may not have intended.

cookiecrook avatar Jan 29 '25 01:01 cookiecrook

@cookiecrook but aria-level is required on role heading, so that would be an authoring error.

pkra avatar Jan 29 '25 09:01 pkra