Skip to content

Commit

Permalink
Simplify ARIA label description to reduce redundancy
Browse files Browse the repository at this point in the history
  • Loading branch information
Maddily authored Nov 17, 2024
1 parent cffed14 commit 30e50b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion advanced_html_css/accessibility/wai_aria.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ARIA labels help users of assistive technologies better understand the content o

You may remember being warned against using the `id` attribute earlier in the curriculum. To briefly recap, normally you want to avoid overusing `id` attributes or even using it when it isn't necessary (which more often than not, it isn't, and you should stick with using classes). There are several ARIA attributes, however, that actually *require* another element to have an `id`.

When using such ARIA attributes, you would provide an `id` to one element, and you would then pass in that `id` value as another element's ARIA attribute value. This creates a link between the elements, similar to how a `<label>` element's `for` attribute creates a link to an input's `id`. Of the three types of ARIA labels mentioned below, both `aria-labelledby` and `aria-describedby` are two of the ARIA attributes that require another element to be given an `id`.
When using such ARIA attributes, you would provide an `id` to one element, and you would then pass in that `id` value as another element's ARIA attribute value. This creates a link between the elements, similar to how a `<label>` element's `for` attribute creates a link to an input's `id`. Of the three types of ARIA labels mentioned below, `aria-labelledby` and `aria-describedby` are ARIA attributes that require another element to have an `id`.

#### aria-label

Expand Down

0 comments on commit 30e50b0

Please sign in to comment.