Skip to content
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

Improve accessibility (part 3) #4405

Merged
merged 16 commits into from
Jul 27, 2017
Merged

Improve accessibility (part 3) #4405

merged 16 commits into from
Jul 27, 2017

Conversation

sorin-davidoi
Copy link
Contributor

@sorin-davidoi sorin-davidoi commented Jul 27, 2017

Follow-up to #4369 and #4377. Mostly fixes errors discovered by WAVE Web Accessibility Tool.

cc: @yiskah

@sorin-davidoi
Copy link
Contributor Author

I think the warnings are wrong? input is inside label (which is what WAVE Web Accessibility Tool suggests).

@sorin-davidoi sorin-davidoi changed the title Improve accessibility 3 Improve accessibility (part 3) Jul 27, 2017
@unarist
Copy link
Contributor

unarist commented Jul 27, 2017

Looks like it was fixed last month? https://github.com/evcohen/eslint-plugin-jsx-a11y/releases/tag/v6.0.0

@@ -133,15 +135,15 @@ export default class ColumnHeader extends React.PureComponent {

return (
<div className={wrapperClassName}>
<div role='heading' tabIndex={focusable && '0'} className={buttonClassName} aria-label={title} onClick={this.handleTitleClick}>
<h1 role='heading' tabIndex={focusable && '0'} className={buttonClassName} aria-label={title} onClick={this.handleTitleClick}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's heading element now, so role='heading' can be removable.

@Gargron
Copy link
Member

Gargron commented Jul 27, 2017

Form controls using a label to identify them must be programmatically associated with the control using htmlFor

Hwhat?

@sorin-davidoi
Copy link
Contributor Author

sorin-davidoi commented Jul 27, 2017

Should I just silence the errors for now? Silenced.

I've added the inert attribute to the siblings of modal-root when it is opened. I'm deliberately not including the polyfill because I didn't test it's performance (relies on mutation observers) - it has no effect in browsers that don't support it.

@Gargron Gargron merged commit 6884dd7 into mastodon:master Jul 27, 2017
@sorin-davidoi sorin-davidoi deleted the improve-accessibility-3 branch July 27, 2017 22:56
@yiskah
Copy link
Contributor

yiskah commented Jul 28, 2017

<3 you're the best sorin

hcmiya pushed a commit to hcmiya/v6don that referenced this pull request Jul 29, 2017
* fix(compose): Add aria-label for the navigation links

* fix(search): Add input label

* fix(navigation_bar): Link description

* fix(autosuggest_textarea): Add input label

* fix(compose_form): Add input label

* fix(upload_button): Add input label

* fix(account/header): Add link content

* fix(column_header): Use h1 tag

* fix(column_header): Labels move buttons moving column

* fix(settings_text): Add label to input

* fix(column_header): Remove role from h1

* fix(modal_root): Use role=dialog

* fix(modal_root): Focus restauration

* fix(modal_root): Apply inert to sibligs

* fix(column_header): Add role=button

* chore(eslint): Disable jsx-a11y/label-has-for
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants