/
home
/
techb158
/
balavpn.abdallabala.com
/
node_modules
/
eslint-plugin-jsx-a11y
/
docs
/
rules
/
/home/techb158/balavpn.abdallabala.com/node_modules/eslint-plugin-jsx-a11y/docs/rules
mkdir
upload
Name
Size
Mode
Actions
accessible-emoji.md
1016
0666
edit
dl
rm
alt-text.md
5080
0666
edit
dl
rm
anchor-ambiguous-text.md
3011
0666
edit
dl
rm
anchor-has-content.md
1622
0666
edit
dl
rm
anchor-is-valid.md
11076
0666
edit
dl
rm
aria-activedescendant-has-tabindex.md
2068
0666
edit
dl
rm
aria-props.md
870
0666
edit
dl
rm
aria-proptypes.md
823
0666
edit
dl
rm
aria-role.md
1999
0666
edit
dl
rm
aria-unsupported-elements.md
1042
0666
edit
dl
rm
autocomplete-valid.md
1427
0666
edit
dl
rm
click-events-have-key-events.md
939
0666
edit
dl
rm
control-has-associated-label.md
3811
0666
edit
dl
rm
heading-has-content.md
1584
0666
edit
dl
rm
html-has-lang.md
791
0666
edit
dl
rm
iframe-has-title.md
889
0666
edit
dl
rm
img-redundant-alt.md
1882
0666
edit
dl
rm
interactive-supports-focus.md
6277
0666
edit
dl
rm
label-has-associated-control.md
4947
0666
edit
dl
rm
label-has-for.md
3777
0666
edit
dl
rm
lang.md
709
0666
edit
dl
rm
media-has-caption.md
2088
0666
edit
dl
rm
mouse-events-have-key-events.md
2033
0666
edit
dl
rm
no-access-key.md
896
0666
edit
dl
rm
no-aria-hidden-on-focusable.md
1505
0666
edit
dl
rm
no-autofocus.md
1077
0666
edit
dl
rm
no-distracting-elements.md
1506
0666
edit
dl
rm
no-interactive-element-to-noninteractive-role.md
2855
0666
edit
dl
rm
no-noninteractive-element-interactions.md
5719
0666
edit
dl
rm
no-noninteractive-element-to-interactive-role.md
2733
0666
edit
dl
rm
no-noninteractive-tabindex.md
5322
0666
edit
dl
rm
no-onchange.md
1671
0666
edit
dl
rm
no-redundant-roles.md
1405
0666
edit
dl
rm
no-static-element-interactions.md
4398
0666
edit
dl
rm
prefer-tag-over-role.md
550
0666
edit
dl
rm
role-has-required-aria-props.md
926
0666
edit
dl
rm
role-supports-aria-props.md
1658
0666
edit
dl
rm
scope.md
640
0666
edit
dl
rm
tabindex-no-positive.md
849
0666
edit
dl
rm
Edit:
/home/techb158/balavpn.abdallabala.com/node_modules/eslint-plugin-jsx-a11y/docs/rules/aria-role.md
(1999B)
# jsx-a11y/aria-role 💼 This rule is enabled in the following configs: ☑️ `recommended`, 🔒 `strict`. <!-- end auto-generated rule header --> Elements with ARIA roles must use a valid, non-abstract ARIA role. A reference to role definitions can be found at [WAI-ARIA](https://www.w3.org/TR/wai-aria/#role_definitions) site. ## Rule options This rule takes one optional object argument of type object: ```json { "rules": { "jsx-a11y/aria-role": [ 2, { "allowedInvalidRoles": ["text"], "ignoreNonDOM": true }], } } ``` `allowedInvalidRules` is an optional string array of custom roles that should be allowed in addition to the ARIA spec, such as for cases when you [need to use a non-standard role](https://axesslab.com/text-splitting). For the `ignoreNonDOM` option, this determines if developer created components are checked. ### Succeed ```jsx <div role="button"></div> <!-- Good: "button" is a valid ARIA role --> <div role={role}></div> <!-- Good: role is a variable & cannot be determined until runtime. --> <div></div> <!-- Good: No ARIA role --> <Foo role={role}></Foo> <!-- Good: ignoreNonDOM is set to true --> ``` ### Fail ```jsx <div role="datepicker"></div> <!-- Bad: "datepicker" is not an ARIA role --> <div role="range"></div> <!-- Bad: "range" is an _abstract_ ARIA role --> <div role=""></div> <!-- Bad: An empty ARIA role is not allowed --> <Foo role={role}></Foo> <!-- Bad: ignoreNonDOM is set to false or not set --> ``` ## Accessibility guidelines - [WCAG 4.1.2](https://www.w3.org/WAI/WCAG21/Understanding/name-role-value) ### Resources - [Chrome Audit Rules, AX_ARIA_01](https://github.com/GoogleChrome/accessibility-developer-tools/wiki/Audit-Rules#ax_aria_01) - [DPUB-ARIA roles](https://www.w3.org/TR/dpub-aria-1.0/) - [MDN: Using ARIA: Roles, states, and properties](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques)
Save
cmd:
run