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

Question should aria-roledescription be prohibited on additional roles? #1651

Closed
scottaohara opened this issue Nov 24, 2021 · 10 comments · Fixed by #1666
Closed

Question should aria-roledescription be prohibited on additional roles? #1651

scottaohara opened this issue Nov 24, 2021 · 10 comments · Fixed by #1666
Assignees
Milestone

Comments

@scottaohara
Copy link
Member

scottaohara commented Nov 24, 2021

Should we be more prescriptive of what roles should be marked as being prohibited from using aria-roledescription? generic is the only role that presently prohibits this (note: would have also expected this on none/presentation - but actually i kinda expect all global attributes to be prohibited on those roles since they undo the role... but i digress).

For instance, role=paragraph or the <p> element. While it has an implicit / explicit ARIA role, what would the expectation here be? That screen readers, which generally don't announce a role like this, instead start announcing this modified role 'description'?

Upon a quick test, <p aria-roledescription="oh no">hi there</p> NVDA actually does announce "oh no" when i navigate to the paragraph. But is that a good idea? JAWS and Narrator don't do this when navigating by paragraph... people don't generally expect a "paragraph" role to be announced.

Thoughts?

@stes-acc
Copy link

stes-acc commented Nov 25, 2021

It is true that currently different screen readers handle verbosity of aria-roledescription differently. NVDA seems to anounce the roledescription always instead of base role whereas Jaws seems to have different per-role based heuristicts.

For instance, a link with roledescription is anounced in NVDA with the roledescription and not any more as link.

In JAWS it is still announced as a link but the roledescription is mapped on the braille display as additional string. Not so for some other "weaker" control roles, here the role description string also "wins" in speech output.

In both screen readers the link is still visible in the link lists.

In my opinion, there seems to be a need to clarify more what should be done all accross screen readers.

@pkra
Copy link
Member

pkra commented Nov 25, 2021

Personally, I know only very few use cases where aria-roleDescription is truly useful for users (mostly, in educational settings). Anecdotally, I suspect many developers are not aware that they might "overwrite" something and they are actually looking for a way to add information, e.g., hint. Restricting aria-roleDescription sounds good to me but perhaps there's a separate use case for adding complementary information (see also my comment at #1643 (comment)).

@cookiecrook
Copy link
Contributor

I would argue against limiting it. It's a tool. Sometimes people misuse tools to their peril… or benefit.

If we over-specify when a tool should not work, authors will just work around it, presumably by using the wrong role on some element. Better to only add limits once there is a well-established anti-pattern that is causing Web-wide breakage.

@cookiecrook
Copy link
Contributor

As a contrived example, if we specified you could not use it on heading, and an author wanted a "super heading" (for better or worse), they'd try using some other role like note. Unbeknownst to them, they'd break heading navigation in the process.

@JAWS-test
Copy link
Contributor

@cookiecrook

I agree with you that not every possible abuse should be countered by severely restricting the use of ARIA attributes. However, @scottaohara's request refers to a specific case, namely that a semantic element (<p>) is usually output by assistive technology without a role. Now what should happen if this element has a roledescription? I think there are two possibilities:

  • The specification prohibits the use of aria-roledescription on these elements or
  • The specification specifies that even for roles that do not cause AT to output the role, aria-roledescription causes the role to be output.

I would be in favor of the second option, and would report a bug for AT that do not do this so far (like JAWS).

@cookiecrook
Copy link
Contributor

cookiecrook commented Nov 30, 2021

@JAWS-test wrote:

The specification specifies that even for roles that do not cause AT to output the role, aria-roledescription causes the role to be output.

At low verbosity, most role descriptions (custom or otherwise) should not be spoken at all. I don’t think an author specifying a role description should override the AT user’s verbosity settings.

I’d suggest a 3rd possibility. The spec can have a note that indicates AT may or may not convey the role description due to defaults, user settings, or other factors.

IMO, no restriction is needed on paragraph, list items, etc.

@stes-acc
Copy link

@JAWS-test wrote:

The specification specifies that even for roles that do not cause AT to output the role, aria-roledescription causes the role to be output.

At low verbosity, most role descriptions (custom or otherwise) should not be spoken at all. I don’t think an author specifying a role description should override the AT user’s verbosity settings.

I’d suggest a 3rd possibility. The spec can have a note that indicates AT may or may not convey the role description due to defaults, user settings, or other factors.

IMO, no restriction is needed on paragraph, list items, etc.

I would also agree that all AT should treat roledescription as part of their verbosity settings, if technically possible on a per-site approach (since some sites may rely on them for more clarity and others don't).

@scottaohara
Copy link
Member Author

Thanks all and @cookiecrook. I definitely was more concerned about the idea of authors using aria-roledescription on paragraphs, or other text-semantic elements that are not generic. Since those roles would generally not be announced, I like the idea of, if not saying "don't use this here", a note indicating "this is allowed, but may not actually expose any meaningful info and/or could add unwanted noise to your otherwise straightforward content"

@jnurthen jnurthen added this to the ARIA 1.3 milestone Dec 2, 2021
scottaohara added a commit that referenced this issue Dec 21, 2021
closes #1651

adds a note indicating that `aria-roledescription` may not be conveyed depending on the element/AT defaults or user settings.
@JAWS-test
Copy link
Contributor

Regardless of the discussion here, aria-roledescription should not be allowed on presentation/none, because it makes no sense for an element to have no role but roledescription.

@scottaohara
Copy link
Member Author

arguably all inherited states and properties should be marked as prohibited on a role=none|presentation element since they all result in an instance where the browser has to ignore the role and expose the implicit or fallback one instead.

but that's a different issue to file

pkra pushed a commit that referenced this issue Apr 29, 2022
adds a note indicating that `aria-roledescription` may not be conveyed depending on the element/AT defaults or user settings.

closes #1651
pkra pushed a commit that referenced this issue Jul 14, 2022
adds a note indicating that `aria-roledescription` may not be conveyed depending on the element/AT defaults or user settings.

closes #1651
jnurthen pushed a commit that referenced this issue Oct 10, 2023
adds a note indicating that `aria-roledescription` may not be conveyed depending on the element/AT defaults or user settings.

closes #1651
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants