Skip to content

Commit

Permalink
Editorial: revise redundant role declaration example (#482)
Browse files Browse the repository at this point in the history
* Editorial: revise redundant role declaration example closes #478
* remove errant `;` closes #479
  • Loading branch information
scottaohara authored Jul 12, 2023
1 parent 60534de commit 9c74a5d
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,11 @@ <h3>
&lt;main role="Main">...&lt;/main>
</pre>
<p>
The following uses a `role=list` on an [^ul^] element. This is
generally unnecessary, because the `ul` element is implicitly exposed
as a `role=list`. However, some user agents suppress a list's
implicit ARIA semantics if list markers are removed. Authors can
use `role=list` to reinstate the role if necessary, though this
practice would generally not be recommended, otherwise.
The following uses a `role=list` on an [^ul^] element. As the `ul` element has an implicit role of `list`,
explicitly adding the role would generally be considered redundant. However, some user agents suppress a list's
implicit ARIA semantics if the list markers are removed from the visual presentation of the list items.
Generally the redundant declaration of an element's implicit role would not be recommended, but in specific situations
such as this, and where the role is necessary to expose, authors can explicitly add the role.
</p>
<pre class="HTML example" title="Redundant role on list">
&lt;!-- Generally avoid doing this! -->
Expand Down Expand Up @@ -374,7 +373,7 @@ <h3>Adhere to the rules of ARIA</h3>
</p>
<pre class="HTML example" title="Do not specify elements as generic">
&lt;!-- Avoid doing this! -->
&lt;article role="generic" ...>...&lt;/article>;
&lt;article role="generic" ...>...&lt;/article>
</pre>
<p>
Additionally, ARIA specifically mentions in <a data-cite="wai-aria-1.2/#host_general_conflict">Conflicts with Host Language Semantics</a>
Expand Down

0 comments on commit 9c74a5d

Please sign in to comment.