Skip to:

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#3092 closed enhancement (fixed)

Reply button needs rendering as button for screen readers

Reported by: alexstine Owned by: johnjamesjacoby
Milestone: 2.6 Priority: high
Severity: major Version: 2.5.13
Component: General - Accessibility Keywords: commit


For both the topic reply and reply reply links, they are not rendered as buttons. They need to be rendered as buttons to ensure screen readers recognize that it is a button that stays on the current page vs a link which is outbound. Take this code example.

<a href="#bbp-reply">Sample Reply Link</a>

To screen reader users, this is an outbound link and after clicking said link, they expect to be taken to another page.

<a role="button" href="#bbp-reply">Sample Reply Link</a>

Adding an ARIA-role allows to render the link as a button for just screen reader users while keeping the same default link behavior. Now screen readers will notify that it is a button rather than outbound link.

One final change that needs to be made is after selecting reply, it needs an auto focus in the textarea. If this does not happen, screen readers would never know another box opened or that the button/link did anything at all.

Hope it's useful, thanks.

Change History (5)

#1 @alexstine
2 years ago

I gave it a high priority because the link is practically useless to the blind unless they know bbPress and understand what happens after they click the link. New users will certainly be confused by this one.

I'll be removing from my own forum in the mean time, please ask if you have questions for me.

#2 @johnjamesjacoby
2 years ago

  • Keywords commit added; has-patch removed
  • Milestone changed from Awaiting Review to 2.6
  • Owner set to johnjamesjacoby

This makes sense to me. Thanks for noticing and creating this ticket. I really appreciate it, and will make sure this is improved for 2.6.

#3 @johnjamesjacoby
2 years ago

  • Resolution set to fixed
  • Status changed from new to closed

In 6388:

Replies: Add role="button" to reply-to links.

Also normalize surrounding "Reply" text escaping.

Fixes #3092. Props alexstine.

#4 @johnjamesjacoby
2 years ago

It may have been theme related, or we might have changed the ID of the form in 2.6, but note that bbPress's is #new-post and not #bbp-reply.

#5 @alexstine
2 years ago

Awesome, glad to hear.

Note: See TracTickets for help on using tickets.