Closed mercime closed 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.
Added role='button'
to the primary activity reply button but not sure if it's possible to add the expanded attr currently.
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?
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.
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!
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.
Adding a note here that the show all comments link ought to have expanded role added
@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?
@hnla I agree, remove the aria-expanded
attr and the bp-data-tooltip
attr as well since it is a text link already.
There are some buttons where aria-state should be added for assistive technologies, for example:
aria-pressed="false"
toaria-pressed="true"
and vice versa when conversation is Unstarredrole="button"
for the link (to do in #78), fromaria-expanded="false"
toaria-expanded="true"
when clicked to open and vice versa when reply is cancelled.