mirror of
https://github.com/flarum/core.git
synced 2025-07-26 03:01:22 +02:00
[A11Y] Make checkboxes focusable (#3014)
* Add extra feature to a11y focusring mixin * Add visually hidden CSS class and mixin * Visually hide checkboxes (keep in focus/a11y tree) * Place checkbox focus ring around display element * Improve mobile checkbox/switch accessibility
This commit is contained in:
@@ -33,7 +33,9 @@ export default class Checkbox extends Component {
|
||||
return (
|
||||
<label className={className}>
|
||||
<input type="checkbox" checked={this.attrs.state} disabled={this.attrs.disabled} onchange={withAttr('checked', this.onchange.bind(this))} />
|
||||
<div className="Checkbox-display">{this.getDisplay()}</div>
|
||||
<div className="Checkbox-display" aria-hidden="true">
|
||||
{this.getDisplay()}
|
||||
</div>
|
||||
{vnode.children}
|
||||
</label>
|
||||
);
|
||||
|
Reference in New Issue
Block a user