Repository navigation
refactor: move ARIA attributes logic to FieldAriaController - #3048
Merged
Merged
Conversation
vursen
force-pushed
the
feat/field-aria-controller
branch
4 times, most recently
from
November 15, 2021 13:59
4e00181 to
1fc408a
Compare
web-padawan
requested changes
Nov 15, 2021
web-padawan
left a comment
Member
There was a problem hiding this comment.
General approach looks good, added a couple of non-critical suggestions.
vursen
commented
Nov 16, 2021
|
|
||
| beforeEach(() => { | ||
| group = fixtureSync('<vaadin-checkbox-group helper-text="Choose one"></vaadin-checkbox-group>'); | ||
| group = fixtureSync('<vaadin-checkbox-group helper-text="Choose one" label="Label"></vaadin-checkbox-group>'); |
Contributor
Author
There was a problem hiding this comment.
Previously, the field groups used to add the label id to the aria-labelledby attribute even when no label is provided.
The PR aligns it with non-group fields in a way that the label id is now only added to the attribute when a label is present.
vursen
force-pushed
the
feat/field-aria-controller
branch
from
November 17, 2021 06:30
82df8ae to
b830a5f
Compare
vursen
commented
Nov 17, 2021
vursen
commented
Nov 17, 2021
vursen
force-pushed
the
feat/field-aria-controller
branch
from
November 17, 2021 13:43
47eb482 to
1527867
Compare
vursen
marked this pull request as ready for review
November 17, 2021 13:44
vursen
force-pushed
the
feat/field-aria-controller
branch
from
November 17, 2021 14:01
4d08be4 to
1361f0f
Compare
web-padawan
reviewed
Nov 17, 2021
|
Kudos, SonarCloud Quality Gate passed!
|
web-padawan
approved these changes
Nov 17, 2021
web-padawan
left a comment
Member
There was a problem hiding this comment.
LGTM. I think we can cherry-pick both #3069 and this to 22.0 branch.
vursen
added a commit
that referenced
this pull request
Nov 18, 2021
web-padawan
pushed a commit
that referenced
this pull request
Nov 18, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.








Description
At the moment,
FieldMixinoverrides thearia-labelledbyattribute's initial value with slotted elements' ids (error id, label id...). It turned out to be an obstacle to fixing #1145, where the form-item needs to link its label with a child field via thearia-labelledbyfield's attribute, but the attribute ends up overridden byFieldMixin.AriaLabelControllerandFieldMixintoFieldAriaController.AriaLabelControllertoLabelledInputControllersince it doesn't have ARIA attributes related logic anymore.aria-labelledbyattribute's initial value inFieldAriaController.FieldMixin.FieldAriaController.FieldAriaController.Part of #1145
Type of change
Checklist