Skip to content

Commit 618b419

Browse files
phsantiagoleticyasmelo
authored andcommitted
remove pathname from same page anchor links
1 parent 3b49329 commit 618b419

File tree

1 file changed

+2
-2
lines changed
  • files/en-us/web/accessibility/aria/attributes/aria-label

1 file changed

+2
-2
lines changed

files/en-us/web/accessibility/aria/attributes/aria-label/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ spec-urls: https://w3c.github.io/aria/#aria-label
77

88
{{AccessibilitySidebar}}
99

10-
The `aria-label` attribute defines a string value that can be used to name an element, as long as the element's role does not [prohibit naming](/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label#associated_roles).
10+
The `aria-label` attribute defines a string value that can be used to name an element, as long as the element's role does not [prohibit naming](#associated_roles).
1111

1212
## Description
1313

1414
Sometimes, the default {{Glossary("accessible_name", "accessible name")}} of an element is missing or the accessible name does not accurately describe the contents of the element and there is no content visible in the DOM that can be associated with the object to give it meaning. A common example of such an element is a button containing an SVG icon without any text.
1515

16-
In cases where an element that is not part of the [prohibited list](/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label#associated_roles), has no accessible name or an accessible name is not accurate and there is no content visible in the DOM that can be referenced via the [`aria-labelledby`](/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby) attribute, the `aria-label` attribute can be used to define a string that labels the interactive element on which it is set. This provides the element an accessible name.
16+
In cases where an element that is not part of the [prohibited list](#associated_roles), has no accessible name or an accessible name is not accurate and there is no content visible in the DOM that can be referenced via the [`aria-labelledby`](/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby) attribute, the `aria-label` attribute can be used to define a string that labels the interactive element on which it is set. This provides the element an accessible name.
1717

1818
The code below shows an example of how to use the `aria-label` attribute to provide an accessible name for a `<button>` element. The button in this example contains an SVG graphic and lacks textual content, making the `aria-label` essential for screen reader users to understand its function, which in this case is "Close".
1919

0 commit comments

Comments
 (0)