File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,21 +10,19 @@ const { roles } = require('aria-query');
1010// aria-query's taxonomy, but supports `aria-activedescendant` and is widget-
1111// like in practice. jsx-a11y and lit-a11y add it for the same reason.
1212//
13- // `tooltip` is also added — ARIA 1.2 doesn't cleanly categorize tooltip under
14- // the widget taxonomy ( aria-query's superClass is `structure/section` ), but
15- // tooltips with interactive content (close buttons, links) are common and our
16- // existing test suite treats them as interactive .
13+ // `tooltip` is intentionally NOT added. Per WAI- ARIA 1.2 §5.3.3 — Document
14+ // Structure Roles (https://www.w3.org/TR/wai- aria-1.2/#tooltip ), tooltip is
15+ // a document-structure role, not a widget; the spec says "document structures
16+ // are not usually interactive." jsx-a11y and lit-a11y agree .
1717module . exports . INTERACTIVE_ROLES = buildInteractiveRoleSet ( ) ;
1818
1919function buildInteractiveRoleSet ( ) {
20- const result = new Set ( [ 'toolbar' , 'tooltip' ] ) ;
20+ const result = new Set ( [ 'toolbar' ] ) ;
2121 for ( const [ role , def ] of roles ) {
2222 if ( def . abstract ) {
2323 continue ;
2424 }
25- const descendsFromWidget = ( def . superClass || [ ] ) . some ( ( chain ) =>
26- chain . includes ( 'widget' )
27- ) ;
25+ const descendsFromWidget = ( def . superClass || [ ] ) . some ( ( chain ) => chain . includes ( 'widget' ) ) ;
2826 if ( descendsFromWidget ) {
2927 result . add ( role ) ;
3028 }
You can’t perform that action at this time.
0 commit comments