ui icon indicating copy to clipboard operation
ui copied to clipboard

HTML Error - Bad value button for attribute role on element li.

Open vnfrr opened this issue 3 years ago • 3 comments
trafficstars

Hi,

the carousel__dots return HTML errors because role="button" is not allowed on <li> tags. Valid HTML is a criteria for accessibility.

Is it possible for you to create inner buttons or make the markup customizable like the navigation buttons? <li class="carousel__dot is-selected" data-page="0" role="button" tabindex="0" title="Zur #1 Folie gehen"></li>

vnfrr avatar Mar 09 '22 12:03 vnfrr

Hi,

Why do you think that this is an issue? That attribute actually was added to improve accessibility. Have you used real screen reader?

fancyapps avatar Mar 09 '22 13:03 fancyapps

Because an li may not have role=button, see https://www.w3.org/TR/html-aria/#el-li. I know its not (for now) a WCAG error but I don't quite follow why you wouldn't be able to put a real button inside the li.

Furthermore (I´m not quite sure) but if you use li[role=button] in IE, JAWS will not count it as a list item anymore, or have you tested it?

vnfrr avatar Mar 09 '22 13:03 vnfrr

I myself have observed people with various disabilities using computers and software. I will add buttons for the sake of semantics in the future releases.

fancyapps avatar Mar 22 '22 11:03 fancyapps

Hi,

v5 has been released recently and button elements are used not only for carousel dot navigation, but also for thumbnails.

fancyapps avatar Feb 24 '23 15:02 fancyapps