core-aam icon indicating copy to clipboard operation
core-aam copied to clipboard

WebKit mappings are not correct for style-based roles: strong, emphasis, maybe more…

Open cookiecrook opened this issue 3 years ago • 3 comments

WebKit mappings are not correct for style-based roles: strong, emphasis, maybe more…

There are number of AXSubroles listed that don't match the implementation: AXStrongStyleGroup, AXEmphasisStyleGroup, etc.

Looks like @joanmarie made the change in WebKit but it was immediately reverted, due to breakage. So it was only in a single nightly build, as far as I can tell. https://github.com/WebKit/WebKit/commit/8095dc16c592a6ebd6f833a5a92edd4ad9f388fc

cookiecrook avatar Jun 30 '22 19:06 cookiecrook

FWIW, I'm still of the opinion that <strong> and <em> should map to generic, not new stylistic ARIA roles.

cookiecrook avatar Jun 30 '22 19:06 cookiecrook

<code> and some others seem reasonable to have a role. See discussion in https://github.com/w3c/html-aam/issues/373

cookiecrook avatar Jun 30 '22 19:06 cookiecrook

Regardless of whether we keep or ditch the strong role, I think the mapping for <strong> and <b> would still be:

AXRole: AXGroup
AXRole: <nil>
Expose the text style as Bold.

Ditto for the new emphasis style role:

AXRole: AXGroup
AXRole: <nil>
Expose the text style as Italic.

Which WebKit already does, so this fix can probably proceed regardless of the other discussion about generic roles. I'll wait a while for @joanmarie or others to comment before posting a PR.

cookiecrook avatar Jul 01 '22 00:07 cookiecrook