skip to Main Content

If I’m rendering a series of records with edit/delete icons on the right, should those icons have unique aria labels, like "Edit Record A", or is it fine for them to have a generic aria-label="Edit"?

2

Answers


  1. I think it could be helpful to provide unique/descriptive ARIA labels for each edit/delete icon in a series of records. It ensures accessibility for users with screen readers, helping them understand the specific context and action associated with each icon.

    While it might not be strictly required by all accessibility standards, unique labels enhance user experience and clarity, making it easier for users to identify and interact with the desired record.

    Login or Signup to reply.
  2. The general answer to your question is, "It depends."

    In your specific example of "Edit" buttons (or links, but ideally buttons I would say), the context of what is about to be edited should be clear to users. If you take the Web Content Accessibility Guidelines at face value (e.g. WCAG SC 2.4.4 (Level A) versus WCAG SC 2.4.9 (Level AAA)), there should be no need for different values for the aria-label attributes at Level AA.

    However, adding helpful context to the aria-label would provide a better experience for people using assistive technology. As well a screen reader user more easily understanding the purpose of each button, consider someone using voice access software to issue commands to navigate. By providing unique names for interactive controls, it would be much easier for someone to say "Click Edit Record A" than having to use a different method to issue the voice command to "click" the desired edit button. This is similar to the requirement in WCAG SC 2.5.3: Label in Name (Level A), where the accessible names of a control must match its visible label.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search