@@ -30,7 +30,7 @@ the plugin's "when in doubt, don't flag" stance.
3030- Elements with ` tabindex ` (any value). An explicit ` tabindex ` signals
3131 author-intent-to-interact, even when the computed ARIA role is still
3232 generic. Flagging here has a high false-positive cost (the author
33- * wants * the label read on focus) relative to the true-positive it
33+ _ wants _ the label read on focus) relative to the true-positive it
3434 would catch. Disable this hatch with ` strictTabindex: true ` below.
3535- Elements with ` role="presentation" ` / ` role="none" ` .
3636- Elements whose role is inherently nameable (e.g. ` button ` , ` link ` ,
@@ -40,16 +40,13 @@ the plugin's "when in doubt, don't flag" stance.
4040
4141- ` strictTabindex ` (` boolean ` , default ` false ` ): when ` true ` , the
4242 tabindex escape hatch is disabled — a `<div tabindex="0"
43- aria-label="x">` is flagged as strictly as any other generic element.
43+ aria-label="x">` is flagged as strictly as any other generic element.
4444 Enable this for strict spec-role enforcement.
4545
4646``` js
4747module .exports = {
4848 rules: {
49- ' ember/template-no-aria-label-misuse' : [
50- ' error' ,
51- { strictTabindex: true },
52- ],
49+ ' ember/template-no-aria-label-misuse' : [' error' , { strictTabindex: true }],
5350 },
5451};
5552```
@@ -71,8 +68,10 @@ Allows:
7168``` hbs
7269<button aria-label='Close'>x</button>
7370<main aria-label='Primary'>...</main>
74- <section aria-label='About'>...</section> {{! becomes role=region }}
75- <form aria-label='Search'>...</form> {{! becomes role=form }}
71+ <section aria-label='About'>...</section>
72+ {{! becomes role=region }}
73+ <form aria-label='Search'>...</form>
74+ {{! becomes role=form }}
7675<div role='button' aria-label='Custom'>...</div>
7776<span tabindex='0' aria-label='Focusable'>...</span>
7877```
0 commit comments