Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trim whitespace from computed accessible name/description #95

Open
AlexLloyd0 opened this issue Nov 25, 2020 · 6 comments
Open

Trim whitespace from computed accessible name/description #95

AlexLloyd0 opened this issue Nov 25, 2020 · 6 comments

Comments

@AlexLloyd0
Copy link

Should whitespace be trimmed from the returned accessible name or description? e.g.

<button aria-label=" Hello world ">Hi</button>

My reading of the spec is that the accessible name should be " Hello world ", but browsers expose it as "Hello world", which is more logical to me. Possibly related to #16

copybara-service bot pushed a commit to google/accname that referenced this issue Nov 25, 2020
This matches the behaviour implemented by browsers. Filed w3c/accname#95

PiperOrigin-RevId: 344223264
copybara-service bot pushed a commit to google/accname that referenced this issue Nov 25, 2020
This matches the behaviour implemented by browsers. Filed w3c/accname#95

PiperOrigin-RevId: 344223264
copybara-service bot pushed a commit to google/accname that referenced this issue Nov 25, 2020
This matches the behaviour implemented by browsers. Filed w3c/accname#95

PiperOrigin-RevId: 344223264
copybara-service bot pushed a commit to google/accname that referenced this issue Nov 26, 2020
This matches the behaviour implemented by browsers. Filed w3c/accname#95

PiperOrigin-RevId: 344223264
copybara-service bot pushed a commit to google/accname that referenced this issue Nov 26, 2020
This matches the behaviour implemented by browsers. Filed w3c/accname#95

PiperOrigin-RevId: 344377895
@jnurthen
Copy link
Member

From 2021/06/03 meeting:
msumner: thinks we should trim whitespace, there are quirks where not doing that breaks stuff. In FF spaces in options have caused an issue

jamesn: do we mean at the end of the calculation or during it?

msumner: what to implementers think?

sarah_higley: would advocate for at the end

jcraig: there was some discussion about collapsing multiple whitespace.. is this trimming at the end or ANY whitespace?

jcraig: we need to be careful about inadvertently adding whitespace that the author did not intend

joanie: thinks the example of starting and ending with a space is sub-optimal authoring, but we should not trim

msumner: the spaces may be unintentional, e.g. a side-effect of a CMS

jamesn: there are 9 open acc name whitespace issues, this would be the 10th

msumner: will look at this set of issues and categorize them

@joanmarie
Copy link
Contributor

joanie: thinks the example of starting and ending with a space is sub-optimal authoring, but we should not trim

To be clear: Joanie thinks other trimming is good (e.g. at the end of calculation, and when it is NOT whitespace intentionally added by the author like in the opening report)

@cookiecrook
Copy link
Contributor

Agenda+ since this is coming up in the context of the Interop Accessibility Focus Area

@cookiecrook
Copy link
Contributor

@w3c/aria-editors please add new milestone for 2024... Need to resolve this for Interop 2024 so we don't have to pull out the WPT tests from the Accessibility Focus Area.

@cookiecrook
Copy link
Contributor

FWIW, we did remove/change the nbsp tests in WPT, because the ARIA spec resolved on ASCII whitespace, which does not include non-breaking space.

@spectranaut
Copy link
Contributor

Discussed in https://www.w3.org/2024/05/09-aria-minutes.html#t08
Decision to deep dive all accname whitespace issues after @MelSumner does a review/categorizing of them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Whitespace
  
Needs triage
Development

No branches or pull requests

7 participants