This is a very bad example. When you add role="navigation" to <ul>, you change the default role of <ul>.
This example should look like this: <div role="navigation"> <ul> <li>About</li> <li>Portfolio</li> <li>Contact</li> </ul> <div>
Not only that! When you change the role of the <ul> element, the screenreader will not announce that this is a list of items, will not announce that it has 3 items :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This is a very bad example. When you add
role="navigation"
to<ul>
, you change the default role of<ul>
.This example should look like this:
<div role="navigation">
<ul>
<li>About</li>
<li>Portfolio</li>
<li>Contact</li>
</ul>
<div>
Are you referring to the rule of ARIA usages which says we shouldn't change the role of native elements? I modified the code, thx, good observation.
Not only that! When you change the role of the
<ul>
element, the screenreader will not announce that this is a list of items, will not announce that it has 3 items :)