act-rules.github.io icon indicating copy to clipboard operation
act-rules.github.io copied to clipboard

Visible label is part of accessible name (2ee8b8): symbolic text should not be considered a visible label

Open kengdoj opened this issue 3 years ago • 7 comments

Should Passed Ex 5 be inapplicable?

Success Criterion 2.5.3: Label in Name: For user interface components with labels that include text or images of text, the name contains the text that is presented visually.

From Understanding 2.5.3:

For the purposes of this SC, text should not be considered a visible label if it is used in a symbolic manner,

For this example: The text 'X' in Passed Ex 5 is used in a symbolic manner, so should not be considered a visible label. With this example not having labels that include text or images of text, the SC is inapplicable.


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.

<button aria-label="close">X</button>

kengdoj avatar Dec 13 '22 23:12 kengdoj

We can certainly add in the Applicability the same bit than in the Expectation about "except for characters in the text nodes used to express non-text content." (something like "except when the visible text content contains only characters used to express non-text content").

The problems I see:

  • This won't remove the need to have that exception in the Expectation. Because <button aria-label="close">Close (X)</button> should pass by considering that "(X)" is non-text content. (so we do not simplify the rule)
  • I am not sure that "non-text content" is objective enough to be part of the Applicability 🤔

Ultimately, ACT rules make little differences between Passed and Inapplicable outcomes (as exemplified notably by the implementation mapping that treat them in the exact same way), so I tend to not have a strong opinion one way or the other 🤷 I can see why it makes a difference from a reporting perspective, though…

Jym77 avatar Jan 05 '23 13:01 Jym77

Ultimately, ACT rules make little differences between Passed and Inapplicable outcomes

Yes, agree.

But I think Pass Ex 5 may cause some confusion. I think this example would be Inapplicable for 2.5.3.

<button aria-label="X">X</button>

One can infer that with Pass Ex 5 as it is, then the example above could/would/should fail.

Any objection to removing symbolic character from Pass Ex 5?

kengdoj avatar Feb 23 '23 00:02 kengdoj

No objection in principle.

Jym77 avatar Feb 23 '23 09:02 Jym77

Compiling for TF discussion:

From Understanding 2.5.3:

Note that where a visible text label does not exist for a component, this Success Criterion does not apply to that component.

Symbolic Text: For the purposes of this SC, text should not be considered a visible label if it is used in a symbolic manner,

From Background of the rule:

The understanding document of 2.5.3 Label in Name use the term “symbolic text characters” to refer to a type of non-text content that uses text characters as symbols, such as using “x” to mean “close”. This rule considers them as “characters expressing non-text content”. Unicode emojis are another example of characters expressing non-text content, although these are not “symbolic text characters”.

Does the rule background make a better case for SC 1.1.1 to be applicable? It seems to contradict what is in the Understanding doc by making 2.5.3 applicable to symbolic text?

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.

<button aria-label="close">X</button>

To pass SC 2.5.3, if it were applicable, should it be aria-label="X"?

kengdoj avatar Mar 08 '23 17:03 kengdoj

March (9?) TF meeting discussion points, if I remember correctly:

  1. The rule outcomes are pass | fail | inapplicable. SC results are satisfied | not satisfied.
  2. Part of reason for symbolic text characters to be applicable was for a subjective Applicability. Current Applicability:

This rule applies to any element for which all the following is true:

Further discussions to be had.

kengdoj avatar Apr 05 '23 16:04 kengdoj

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.

"Characters in the text nodes used to express non-text content" are excluded from the Expectation.

Should there be an expectation in this rule for "characters in the text nodes used to express non-text content"?

kengdoj avatar Apr 05 '23 17:04 kengdoj

April 13 Task Force Discussion: add note to Pass Ex 5 that the example passes this rule because of the Expectation exception ("except for characters in the text nodes used to express non-text content), but it would need to meet SC 1.1.1 Non text content.

So, <button aria-label="close">X</button> would pass this rule and so would <button aria-label="anything">X</button>.

kengdoj avatar Apr 13 '23 15:04 kengdoj