Various examples of using ARIA to augment the text of a button.
The example below includes a set of invites to connect to colleagues. Since the Accept and Reject buttons are repeated for each invitation it is desirable to add the colleague name associated with each button for the benefit of users who can't visually comprehend the scope of the buttons. Different ARIA methods are used and documented in each of the examples below. Table of results of testing screen readers with ARIA supported browsers.
Colleagues for Jane Doe
5 New Invitations
Amy Jones
You have 4 colleagues in common
I'd like to add you to my colleagues list.
Uses offscreen span and aria-labelledby to label the button.