Skip to content

Commit

Permalink
fix(aria-allowed-attr): Add 'aria-required' to switch role (#4029)
Browse files Browse the repository at this point in the history
Related: #4027
  • Loading branch information
mikeybinns committed May 22, 2023
1 parent 1d1af09 commit cb51be4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/standards/aria-roles.js
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ const ariaRoles = {
switch: {
type: 'widget',
requiredAttrs: ['aria-checked'],
allowedAttrs: ['aria-readonly'],
allowedAttrs: ['aria-readonly', 'aria-required'],
superclassRole: ['checkbox'],
accessibleNameRequired: true,
nameFromContent: true,
Expand Down
1 change: 1 addition & 0 deletions test/integration/rules/aria-allowed-attr/passes.html
Original file line number Diff line number Diff line change
Expand Up @@ -1922,6 +1922,7 @@
aria-live="value"
aria-owns="value"
aria-relevant="value"
aria-required="value"
>
ok
</div>
Expand Down

0 comments on commit cb51be4

Please sign in to comment.