buddypress / next-template-packs

is this the next BuddyPress template pack?
35 stars 9 forks source link

HTML `<a>` elements should never have `title` attributes. #185

Closed paulgibbs closed 2 years ago

paulgibbs commented 7 years ago

I have not been familiar with the decision to implement the JS-powered tooltips, so I've only pulled those out on anchor elements where they appeared to be a direct replacement for the HTML title= attribute. I hope the accessibility has been reviewed.

In two of the giant button generating classes, I've added a block to conditionally unset them, given the button_element is dynamic.

hnla commented 7 years ago

Probably ought to have checked with the people that have been coding this up really. the changes to the $button args have been especially fraught for me so have to check those changes quite carefully that things still work,

Not sure why you've ripped out other anchor tooltips they've only recently gone in and on things like icon elements they are they for visual purposes.

I'll need to check all this, but really there are other things to be focussing energies on.

paulgibbs commented 7 years ago

Only tool tips on anchor elements have been removed, I haven't removed any of the icon font stuff (and I chose to do the same for the JS approach).

As for the why, because I got feedback from a trusted accessibility expert that this should not be done, per the BP commit message.

mercime commented 7 years ago

data-bp-tooltips are not the same as title attributes which the accessibility expert said should be removed.

Accessibility is for everyone, not only screen readers. Keyboard users, as well as other users, should be able to see the visual cues in lieu of the text that's available for screen readers c/o bp-screen-reader-text.