Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

a11y remove aria-label for oc-select #1534

Closed
wants to merge 2 commits into from

Conversation

lookacat
Copy link
Contributor

Description

See owncloud/web#5394

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation added/updated

@update-docs
Copy link

update-docs bot commented Jul 23, 2021

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@lookacat lookacat changed the base branch from master to a11y-updates July 23, 2021 14:16
@lookacat lookacat requested a review from LukasHirt as a code owner July 23, 2021 14:16
methods: {
setComboBoxAriaLabel() {
const comboBoxElement = this.$refs.select.$el.querySelector("div:first-child")
comboBoxElement.setAttribute("aria-label", this.$gettext("Search for option"))
Copy link
Contributor

Choose a reason for hiding this comment

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

instead of removing it it could be a better approach to use it as a fallback label if no label is provided

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hm i looked up all places where oc-select is used in web and they all set a label (with aria-label) outside of the oc-select, i think it makes more sence to leave the aria-labeling to the implementor since oc-select doesn't include a label.

Copy link
Contributor

Choose a reason for hiding this comment

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

@kulmann @paulcod3 if we plan to merge this it'd be a breaking change and I would suggest cherry-picking it and bringing it inside the v9.0.0 release this week, too 🍒

@pascalwengerter
Copy link
Contributor

@kulmann what's the way to go here? We could either drop the label as Paul suggested or "bring it in" to satisfy owncloud/web#8857. From what I know there's only two occurances in web where we're using it and we could easily re-use the respective computed properties to pass them to the OcSelect

@kulmann
Copy link
Contributor

kulmann commented Aug 5, 2021

I'd like to work towards owncloud/web#8857 to have a consistent component API for form-related elements.

@pascalwengerter
Copy link
Contributor

Okay so closing this in order to provide a solution that works towards owncloud/web#8857

@pascalwengerter pascalwengerter deleted the a11y-5394-remove-aria-label-oc-select branch August 5, 2021 10:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[a11y] 9.2.5.3 - Visible labels are part of the accessible name
4 participants