w3c / html-aria

ARIA in HTML
https://w3c.github.io/html-aria/
Other
181 stars 48 forks source link

Why MUST use lowercase ASCII letters for roles? #280

Closed marcoscaceres closed 3 years ago

marcoscaceres commented 3 years ago

The spec says:

Authors MUST use lowercase ASCII letters for all role token values and any state or property attributes (aria-*) whose values are defined as tokens.

That seems counter to the use of tokenized attribute values elsewhere in HTML, no? Why not just shift that burden to browsers to canonicalize the tokens to lower case before passing them to the AT?

marcoscaceres commented 3 years ago

Also, as an aside, I don't see why this section needs to be called out on its own? It should just be part of the "Developer requirements for use of ARIA in HTML"

stevefaulkner commented 3 years ago

Why not just shift that burden to browsers to canonicalize the tokens to lower case before passing them to the AT?

agree, but will keep this requirement in place until this is implemented.

marcoscaceres commented 3 years ago

It's already implemented, no? Chrome, for instance:

Screen Shot 2021-03-08 at 7 24 00 pm
marcoscaceres commented 3 years ago

Same in Safari, unless I'm doing something wrong?

Screen Shot 2021-03-08 at 7 32 36 pm

JAWS-test commented 3 years ago

It should be tested with all relevant browsers and not only Chrome and Safari

stevefaulkner commented 3 years ago

@marcoscaceres case sensitive in Firefox 87.0b2 (64-bit) test case https://cdpn.io/stevef/debug/WNoawKB

marcoscaceres commented 3 years ago

It should be tested with all relevant browsers and not only Chrome and Safari

Agree. I was just trying to see if there was some browser support. Two browsers conforming does make a standard, so can the requirement be dropped?

@marcoscaceres case sensitive in Firefox 87.0b2 (64-bit)

Understood, but that's then a Firefox bug (given the other browsers do the right thing), right? Something we can bug the gecko folks to fix.

pkra commented 3 years ago

Understood, but that's then a Firefox bug (given the other browsers do the right thing), right? Something we can bug the gecko folks to fix.

Steve went back in time to file it: https://bugzilla.mozilla.org/show_bug.cgi?id=1407167

stevefaulkner commented 3 years ago

@pkra thanks for finding that, it was so long ago had forgotten :-)

marcoscaceres commented 3 years ago

Lol, yeah. Don't give Firefox a pass here. It's a web compat issue, not a spec issue.

scottaohara commented 3 years ago

removed the label for 1.0. per the discussion in the PR, don't want this to merge yet.

marcoscaceres commented 3 years ago

Firefox patch sent. Awaiting review.

marcoscaceres commented 3 years ago

Patch landed and it's shipping in FF Nightly, so now all browser engines behave the same 🎉. @scottaohara, I think that puts this back in scope of 1.0, right?

nschonni commented 3 years ago

I think the browser part addressed, but not the AT and OS API compat https://github.com/w3c/html-aria/pull/287#issuecomment-794992349

marcoscaceres commented 3 years ago

Right, so as Jamie stated:

At the very least, we'd need to figure out how to deal with this ATK/IA2 xml-roles problem. If the browsers should lower case, we need to file and fix bugs in both Firefox and Chromium. if the ATs should deal with that, we need to file and wait for fixes in the ATs.

IIUC, normalizing to lcase at the browser level for computed/derived roles seems best here. However, that's independent of the advice given to developers (which is generally not helpful and doesn't scale).

Having said that, we should also tell the ATs to lcase things, just to make sure we have all bases covered. Do we know folks working on the ATs that we can get in touch with?

scottaohara commented 3 years ago

closing this issue per merge of #333 where "MUST" was changed to "SHOULD"