DEV Community

Discussion on: A Tangled Web of ARIA

Collapse
 
grahamthedev profile image
GrahamTheDev

"The new developers who made the final changes were not aware that by adding a <span> for a dot actually broke semantics for lists."

I think perhaps the example isn't right as a <span> within a role="listitem" is fine as far as I am aware?

I am assuming that the <span> for the dots is not going to interfere with a screen reader due to some weird CSS choices however.

What is broken is that the first listitem doesn't have a space between two attributes class="li"role="listitem" so that will break the list.

I mean, none of it actually matters as you are 100% right that the first example is a steaming pile of XXXXX and the second example is elegant and accessible, but I was just trying to understand what the problem was with the <span>?

Anyway, ignore my ramblings, I love the article and the message, that bit just jumped out at me so I thought I would ask 🤣!

Have a much deserved ❤🦄!

Collapse
 
steady5063 profile image
Mark Steadman

You are 100% correct! I meant to put it outside the listitem and into the containing div with the role of list. That then causes the semantic problems. Great catch! Thank you!

Collapse
 
grahamthedev profile image
GrahamTheDev

That makes sense!

No problem, I am glad it was that as I was seriously questioning myself! 🤣

As I said, great article, I hope at least one person listens and avoids ARIA spaghetti!