aria icon indicating copy to clipboard operation
aria copied to clipboard

Consider a flag warning new developers to avoid some aria features (role desc, braille props, etc)

Open cookiecrook opened this issue 4 years ago • 5 comments
trafficstars

In the role description deep dive this morning, we discussed ways to mitigate author misuse of aria-roledescription, and potentially other properties that 1) aren't commonly required and 2) are easy for inexperienced devs to misuse.

One possibility is to include a flag for "uncommon usage" (name TBD) or something else that indicates:

  • It's NOT expected that most web developers would need to use these features.
  • Even if they are tempted to use one of these, take additional time to seriously understand why you need it and how to use it.
  • Seriously web devs, DO NOT use this unless you have a really good reason.

IMO, the warning text should be bright and bold, immediately following the short description with sufficient use of warning icons or ⚠️ emoji. We might encourage validators or other checker tools to flag these for author review, too.

The braille properties, particularly those that allow characters in the Braille Unicode range, are other good examples. The ARIA WG added these for advanced usage by testing or other educational orgs. No only are they not required for most web apps and pages, chances are that lay usage will actually be more harmful than helpful. In other words, it's dangerous to use these without a full understanding.

In some ways, aria-label and aria-hidden could be considered dangerous; you can misuse them to develop a very inaccessible interface. However, I don't think common features like those should be included in the list due to the widespread use and the generally-more-understandable nature of the features. If we had the warning on aria-hidden, web developers would be more likely to ignore the warning when/if they saw it on aria-braillelabel

cookiecrook avatar May 06 '21 20:05 cookiecrook

These three are the obvious ones:

aria-roledescription
aria-braillelabel
aria-brailleroledescription

I'm not as sure about:

aria-keyshortcuts

@joanmarie @aleventhal @minorninth ??

cookiecrook avatar May 06 '21 20:05 cookiecrook

role

aleventhal avatar May 06 '21 21:05 aleventhal

Why aria-keyshortcuts?

JAWS-test avatar May 07 '21 01:05 JAWS-test

Are you just talking about language in the spec discouraging certain attributes? No arguments there. You're not proposing a javascript console warning or something like that, right?

Maybe we should add the same warning for aria-owns?

minorninth avatar May 07 '21 03:05 minorninth

Are you just talking about language in the spec discouraging certain attributes? No arguments there.

Yes

You're not proposing a javascript console warning or something like that, right?

Not directly, no. However, there might be some value on including a note (non-error, non-warning) in browser checking tools like Lighthouse, AxeCore, or WebKit's Accessibility Inspector... Something equivalent at the priority of console.log() (vs console.warn()) that says, "Ignore this if you really know what you're doing, but… Do you…? Really?"

Maybe we should add the same warning for aria-owns?

+1

cookiecrook avatar May 07 '21 06:05 cookiecrook

Via today's discussion of #2578: aria-keyshortcuts is another possible candidate for this.

pkra avatar Sep 18 '25 17:09 pkra