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

Correction: add missing label elm to 'button' naming steps #423

Merged
merged 6 commits into from
Aug 29, 2022
Merged

Conversation

scottaohara
Copy link
Member

@scottaohara scottaohara commented Jul 8, 2022

adds label element to button, input type=button|submit|reset|image.

This is a long overdue update and there could be more clarity here. However, getting this perfect has long stood in the way of getting this done, and I would rather get this gap resolved to match reality, and then better describe this in a follow revision to these naming steps.

Closes #357 - companion PR to #402


Preview | Diff

adds label element to `button`, `input type=button|submit|reset|image`.

This is a long overdue update and there could be more clarity here.  However, getting this perfect has long stood in the way of getting this done, and I would rather get this gap resolved to match reality, and then better describe this in a follow revision to these naming steps.
@scottaohara scottaohara changed the title add missing label elm to 'button' naming steps Correction: add missing label elm to 'button' naming steps Jul 8, 2022
Copy link
Collaborator

@cookiecrook cookiecrook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this HTML-AAM specific algorithm may start to get to complicated unless it's explicit where each of these steps fits into the main AccName algorithm. For example:

  • Step 1 (aria-label, etc here) is redundant with AccName...
  • Steps 2 and 3 (label el, value attr) fits into the "host language label mechanism" portion of AccName
  • Steps 4 and 5 (title and placeholder attrs) fit into the host language tooltip mechanism portion of AccName.
  • then the final step would be the element-specific fallback label

@scottaohara
Copy link
Member Author

@cookiecrook yes, and this is where some of the cleanup i'm trying to do in another future PR would come into play.

But there are some elements that don't fit neatly with the way that accName is setup. E.g., there are some elements where name from content (accName F) takes precedent over the title attribute... but accName lists label element and title attribute under accName step D. That's not right in all cases, nor should it be.

@cookiecrook
Copy link
Collaborator

Okay then. I approve this diff as-is. Thanks for the follow-up.

@scottaohara scottaohara merged commit 9f17ca2 into gh-pages Aug 29, 2022
@scottaohara scottaohara deleted the 357 branch August 29, 2022 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Button accessibility name doesn't indicate label element can be used
2 participants