Alter id on EuiFormRow wrapping element#2588
Merged
thompsongl merged 6 commits intoelastic:masterfrom Dec 5, 2019
Merged
Conversation
Contributor
|
Any concern that there's now no way to pass an ID to Also, does this constitute a breaking change? (Someone could be expecting the ID on either element to do some hacky things...) |
Contributor
|
I agree with @myasonik, I think we should keep an id on the form row but append |
Contributor
Author
|
I can work on Option 2 👍 |
myasonik
approved these changes
Dec 3, 2019
Contributor
myasonik
left a comment
There was a problem hiding this comment.
🤞 This doesn't make updating Kibana a huge pain...
Contributor
Author
|
Snapshot changes in Kibana appear to be all additions, so that's good. Any functional test failures caused by this will point towards places where |
id from EuiFormRow wrapping elementid on EuiFormRow wrapping element
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.
Summary
Work in #2569 highlights a case where
EuiFormRowcan improperly render multiple elements with the sameid. This only happens when anidis directly passed toEuiFormRow(idremains part of...rest). Regardless, the cloned child form control is the intended target for theid, not the wrapping element.Options:
idfrom the wrapping element entirely(what I've currently done)id(e.g.,${id}-row) so the wrapping element is still referencable (what's currently done)I think it's likely that comprehensive axe analysis would find more than just the one case highlighted in #2569, especially in Kibana.
Checklist
- [ ] Checked in dark mode- [ ] Checked in mobile- [ ] Checked in IE11 and Firefox- [ ] Props have proper autodocs- [ ] Added documentation examples- [ ] Checked for accessibility including keyboard-only and screenreader modes