Skip to content

Commit

Permalink
Account for the null semantic generic role in ARIA 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jessebeach committed Jun 11, 2020
1 parent 7dfa7c9 commit 730319b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/util/isNonInteractiveElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ const nonInteractiveRoles = new Set(roleKeys
// 'toolbar' does not descend from widget, but it does support
// aria-activedescendant, thus in practice we treat it as a widget.
&& name !== 'toolbar'
// This role is meant to have no semantic value.
// @see https://www.w3.org/TR/wai-aria-1.2/#generic
&& name !== 'generic'
&& !role.superClass.some((classes) => includes(classes, 'widget'))
);
}).concat(
Expand All @@ -42,6 +45,9 @@ const interactiveRoles = new Set(roleKeys
// The `progressbar` is descended from `widget`, but in practice, its
// value is always `readonly`, so we treat it as a non-interactive role.
&& name !== 'progressbar'
// This role is meant to have no semantic value.
// @see https://www.w3.org/TR/wai-aria-1.2/#generic
&& name !== 'generic'
&& role.superClass.some((classes) => includes(classes, 'widget'))
);
}).concat(
Expand Down

0 comments on commit 730319b

Please sign in to comment.