diff --git a/_rules/visible-label-in-accessible-name-2ee8b8.md b/_rules/visible-label-in-accessible-name-2ee8b8.md index c17073622e..0b5d195890 100755 --- a/_rules/visible-label-in-accessible-name-2ee8b8.md +++ b/_rules/visible-label-in-accessible-name-2ee8b8.md @@ -38,7 +38,7 @@ This rule applies to any element for which all the following is true: ## Expectation -For each target element, all [text nodes][] in the [visible text content][] either match or are contained within the [accessible name][] of this target element, except for characters in the [text nodes][] used to express [non-text content][]. Leading and trailing [whitespace][] and difference in case sensitivity should be ignored. +For each target element, all [text nodes][] in the [visible text content][] [match characters][] and are contained within the [accessible name][] of this target element, except for characters in the [text nodes][] used to express [non-text content][]. Leading and trailing [whitespace][] and difference in case sensitivity should be ignored. ## Assumptions @@ -97,10 +97,10 @@ This button has [visible][] text that is contained within the [accessible name][ #### Passed Example 5 -This button has [visible][] text that does not need to be contained within the [accessible name][], because the "x" text node is [non-text content][]. +This button has [visible][] text that does not need to be contained within the [accessible name][], because the "x" text node is [non-text content][]. Note: this would need to meet SC 1.1.1 Non text content. ```html - + ``` #### Passed Example 6 @@ -143,6 +143,22 @@ This link has [visible][] text with mathematical symbols, that does not match th Proof of 2×2=4 ``` +#### Failed Example 4 + +This link has [visible][] text does not match the [accessible name][] because there is a hyphen in the accessible name. + +```html +nonstandard +``` + +#### Failed Example 5 + +This link has [visible][] text does not match the [accessible name][] because there are extra spaces in the accessible name. + +```html +123.456.7890 +``` + ### Inapplicable #### Inapplicable Example 1 @@ -181,6 +197,7 @@ This link has no [visible text content][]. ``` [accessible name]: #accessible-name 'Definition of accessible name' +[match characters]: #matching-characters 'Definition of matching characters' [non-text content]: https://www.w3.org/TR/WCAG21/#dfn-non-text-content 'WCAG Definition of Non-text content' [presentational roles conflict resolution]: https://www.w3.org/TR/wai-aria-1.1/#conflict_resolution_presentation_none 'Presentational Roles Conflict Resolution' [semantic role]: #semantic-role 'Definition of Semantic role' diff --git a/pages/glossary/matching-characters.md b/pages/glossary/matching-characters.md index 936d228b0a..4628f99d39 100755 --- a/pages/glossary/matching-characters.md +++ b/pages/glossary/matching-characters.md @@ -5,4 +5,6 @@ unambiguous: true objective: true --- -A sequence of characters is considered to _match_ another if, after removing leading and trailing [space characters](https://html.spec.whatwg.org/#white_space) and replacing remaining occurrences of one or more space characters with a single space, the two sequences of characters are equal character-by-character, ignoring any differences in letter casing. +A sequence of characters is considered to _match_ another if, after removing leading and trailing [whitespace characters][] and replacing remaining occurrences of one or more whitespace characters with a single space, the two sequences of characters are equal character-by-character, ignoring any differences in letter casing. + +[whitespace characters]: #whitespace 'Definition of Whitespace'