buddypress / next-template-packs

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

Add ARIA state changes for button elements #161

Closed mercime closed 7 years ago

mercime commented 7 years ago

There are some buttons where aria-state should be added for assistive technologies, for example:

hnla commented 7 years ago

Those will probably need to be added directly to the button args, adding the attr for the act fav as example. Ajax response needs to be updated though, however not 100% sure it's that necessary in terms of an aria role but better it is re-factored to swap the atts around.

hnla commented 7 years ago

Added role='button' to the primary activity reply button but not sure if it's possible to add the expanded attr currently.

hnla commented 7 years ago

I think that concludes the ticket, but hesitating to close as likely there's something I've overlooked?

On the xprofile visibility updates I was a little uncertain whether they made sense but in the end figured they didn't hurt so switched out the .hide()/.show() for classes and added the states although technically they aren't seen after the action actioned?

mercime commented 7 years ago

Thanks for updating the ARIA state changes and/or role for the activity reply link and and profile visibility block. Need to change aria-pressed to aria-expanded in buddypress-xprofile.js

Let's keep this open. We also need to add the aria-pressed state changes for the Message star/unstar section.

hnla commented 7 years ago

Need to change aria-pressed to aria-expanded in buddypress-xprofile.js

Dammit :) yes had 'pressed' on the mind and a little caught up in a struggle to bend the JS to my will!

hnla commented 7 years ago

regrettably I have had to revert the button element as the backbone JS is not working with them & I can't determine after a fair bit of time why, nor does the Ajax functionality appear to work even after reverting back to anchors.

For the moment the commit gives us normal frontend actions of toggling the aria-pressed state.

hnla commented 7 years ago

Adding a note here that the show all comments link ought to have expanded role added

hnla commented 7 years ago

@mercime Maybe check this? it's an odd one as currently we just remove the action after clicking so can't set an expanded true state. Can I leave it with you to decide on whether we want this attr?

mercime commented 7 years ago

@hnla I agree, remove the aria-expanded attr and the bp-data-tooltip attr as well since it is a text link already.