Support for SVG implicit role
PaulSearcy opened this issue · comments
Coming from a downstream package (testing-library) to make a request to add the implicit role, graphics-document, for svgs.
https://www.w3.org/TR/html-aria/#docconformance
Just a little thing, not a big deal. I'm also going to take a look into the code here to see if it's feasible for me to make a PR!
@PaulSearcy I'm not opposed at all. You'll want to introduce a new directory -- svg
-- into the src/etc/roles
directory for these roles: https://github.com/A11yance/aria-query/tree/main/src/etc/roles
You can add an else if
here:
aria-query/scripts/breakUpAriaJSON.js
Line 246 in 29d5fb2
graphics-
roles into their own directory.
Run this script to parse the JSON file that holds all the role definitions to create the etc directory output:
node ./scripts/breakUpAriaJSON.js
You'll end up hand-writing a lot of information into https://github.com/A11yance/aria-query/blob/main/scripts/roles.json, then running that script to create the src files. I'm happy to review an in-progress PR to let you know if you're headed in the right direction.
It would be great if you could add this. W3C was added to the ARIA semantics in February 2021: