Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add aria-label to checkboxes to prevent doubling of text #1865

Merged
merged 4 commits into from
Sep 13, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion packages/sdk/ui-react/src/widget/checkbox/checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,14 @@ export class Checkbox extends React.Component<CheckboxProps, CheckboxState> {
return (
<label id={this.checkboxId} className={`${styles.label} ${disabledClass} ${className}`} data-checked={checked}>
<span className={`${styles.checkMark} ${checkMarkStyles}`} />
<input type="checkbox" {...inputProps} className={styles.checkbox} ref={this.checkboxRef} readOnly={true} />
<input
aria-label={label}
type="checkbox"
{...inputProps}
className={styles.checkbox}
ref={this.checkboxRef}
readOnly={true}
/>
{label}
{this.props.children}
</label>
Expand Down