-
Notifications
You must be signed in to change notification settings - Fork 108
Fix description text not read on hover by NVDA and other FormFieldLayout bugs
#1863
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,35 @@ components. In most cases it shouldn't be used directly. | |
| --- | ||
| type: example | ||
| --- | ||
| <FormField id="_foo123" label="Opacity" width="200px"> | ||
| <input style={{display: 'block', width: '100%'}} id="_foo123"/> | ||
| </FormField> | ||
| <div> | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've added here a more complex example that we can use to test this PR |
||
| <FormField id="_foo121" label="Stacked layout" width="400px" layout="stacked" | ||
| messages={[{type:'success', text: 'This is a success message'}, {type:'newError', text: 'An error message. It will wrap if the text is longer than the width of the container.'}]}> | ||
| <TextInput id="_foo121"/> | ||
| </FormField> | ||
| test | ||
| <hr/> | ||
| <FormField id="_foo122" label="Stacked layout (inline=true)" width="400px" layout="stacked" inline | ||
| messages={[{type:'success', text: 'This is a success message'}, {type:'newError', text: 'An error message. It will wrap if the text is longer than the width of the container.'}]}> | ||
| <TextInput id="_foo122"/> | ||
| </FormField> | ||
| test | ||
| <hr/> | ||
| <FormField id="_foo123" label="Inline layout" width="400px" layout="inline" | ||
| messages={[{type:'success', text: 'success!'}, {type:'newError', text: 'An error message. It will wrap if the text is longer than the width of the container.'}]}> | ||
| <TextInput id="_foo123"/> | ||
| </FormField> | ||
| test | ||
| <hr/> | ||
| <FormField id="_foo124" label="Inline layout (inline=true)" width="400px" layout="inline" inline | ||
| messages={[{type:'success', text: 'success!'}, {type:'newError', text: 'An error message. It will wrap if the text is longer than the width of the container.'}]}> | ||
| <TextInput id="_foo124"/> | ||
| </FormField> | ||
| test | ||
| <hr/> | ||
| <FormField id="_foo121" label={<ScreenReaderContent>hidden text</ScreenReaderContent>} width="400px" layout="stacked"> | ||
| <TextInput id="_foo121" /> | ||
| </FormField> | ||
| test | ||
| <hr/> | ||
| </div> | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,7 +68,6 @@ class FormField extends Component<FormFieldProps> { | |
| label={this.props.label} | ||
| vAlign={this.props.vAlign} | ||
| as="label" | ||
| htmlFor={this.props.id} | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not needed because the
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. EDIT 2 weeks later: we should not do this, it will bring the last leaf on the focus causing issues with e.g. multiple select |
||
| elementRef={this.handleRef} | ||
| margin={this.props.margin} | ||
| /> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For tests likely this will be most of the change