Summary: | AX: don't expose empty roledescription | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | James Craig <jcraig> | ||||||
Component: | Accessibility | Assignee: | Joanmarie Diggs <jdiggs> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | aboxhall, apinheiro, buildbot, cfleizach, commit-queue, dmazzoni, jdiggs, samuel_white, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
James Craig
2016-10-18 20:18:45 PDT
(In reply to James Craig from comment #0) > Also note the following restriction in the same section: > > User agents must not expose the aria-roledescription property if … The element to which aria-roledescription is applied does not have a valid WAI-ARIA role or does not have an implicit WAI-ARIA role semantic. > > Which seems overly restrictive and I asked for it to be removed. FWIW, I > doubt we'd want to implement this restriction even if the WG declines the > spec change. James: Do you still think it's acceptable to do what you stated in the related github issue [1], namely: <quote> What if you only included this stipulation on generic elements like <div> and <span>? I'd be okay with that restriction. The goal seems to be to avoid problem cases like <div aria-roledescription="button"> and restricting usage on generics would be one way to do that, without penalizing appropriate use on another type of element. </quote> If so, are you ok with my proceeding with that in Safari and WebKitGtk, independent of when the WG adopts the change? [1] https://github.com/w3c/aria/issues/500#issuecomment-266968158 Created attachment 309390 [details]
Patch
Comment on attachment 309390 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=309390&action=review > Source/WebCore/accessibility/AccessibilityObject.cpp:2336 > + return !roleDescription.containsOnlyWhitespace() ? roleDescription : String(); should we just trim the whitespace, so that someone putting role=" button" will also work? then you can return the result directly after trimming Created attachment 309399 [details]
Patch
(In reply to chris fleizach from comment #4) > Comment on attachment 309390 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=309390&action=review > > > Source/WebCore/accessibility/AccessibilityObject.cpp:2336 > > + return !roleDescription.containsOnlyWhitespace() ? roleDescription : String(); > > should we just trim the whitespace, so that someone putting > > role=" button" will also work? > > then you can return the result directly after trimming Done. Comment on attachment 309399 [details] Patch Clearing flags on attachment: 309399 Committed r216457: <http://trac.webkit.org/changeset/216457> All reviewed patches have been landed. Closing bug. (In reply to Joanmarie Diggs (irc: joanie) from comment #2) > James: Do you still think it's acceptable to do what you stated in the > related github issue [1], namely: […snip…] > > If so, are you ok with my proceeding with that in Safari and WebKitGtk, > independent of when the WG adopts the change? Yes, that's fine with me. |