From 6e1493347b482c60db3abcf0a66cf4c581ed494c Mon Sep 17 00:00:00 2001 From: nekosoffy <161766793+nekosoffy@users.noreply.github.com> Date: Sat, 26 Oct 2024 16:04:21 -0300 Subject: [PATCH] WAI-ARIA: Improve paragraph about aria-labelledby --- advanced_html_css/accessibility/wai_aria.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advanced_html_css/accessibility/wai_aria.md b/advanced_html_css/accessibility/wai_aria.md index e6f91981655..353d6181442 100644 --- a/advanced_html_css/accessibility/wai_aria.md +++ b/advanced_html_css/accessibility/wai_aria.md @@ -79,7 +79,7 @@ Once a screen reader reaches the above HTML, it would announce "Main navigation, #### aria-labelledby -The `aria-labelledby` attribute overrides both the native label and the `aria-label` attribute. `aria-labelledby` changes an element's accessible name (created by `aria-labelledby`) to a concatenated string of the text contents or `alt` attributes of the labeling elements (the ones whose `id` are passed in). +The `aria-labelledby` attribute overrides both the native label and the `aria-label` attribute. When you use `aria-labelledby`, the accessible name of the target element is created by concatenating the text contents or `alt` attributes of the elements whose `id` are referenced. The great thing about `aria-labelledby` is that not only can you pass in any number of `id` references, but you can also have an element reference itself. Keep in mind that you can't pass in the same reference multiple times, because any subsequent references after the first will be ignored.