From 8a9d376d6a8494569d7190e87340ef878e1a3b7e Mon Sep 17 00:00:00 2001 From: Sorin Davidoi Date: Fri, 28 Jul 2017 00:54:48 +0200 Subject: [PATCH] Improve accessibility (part 3) (#4405) * 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 --- .eslintrc.yml | 2 +- .../components/autosuggest_textarea.js | 31 ++++++++++--------- .../mastodon/components/column_header.js | 10 +++--- .../mastodon/components/setting_text.js | 15 +++++---- .../features/account/components/header.js | 7 +++-- .../compose/components/compose_form.js | 5 ++- .../compose/components/navigation_bar.js | 1 + .../features/compose/components/search.js | 21 +++++++------ .../compose/components/upload_button.js | 23 ++++++++------ .../mastodon/features/compose/index.js | 14 ++++----- .../features/ui/components/modal_root.js | 28 +++++++++++++++-- app/javascript/mastodon/locales/ar.json | 2 ++ app/javascript/mastodon/locales/bg.json | 2 ++ app/javascript/mastodon/locales/ca.json | 2 ++ app/javascript/mastodon/locales/de.json | 2 ++ .../mastodon/locales/defaultMessages.json | 8 +++++ app/javascript/mastodon/locales/en.json | 2 ++ app/javascript/mastodon/locales/eo.json | 2 ++ app/javascript/mastodon/locales/es.json | 2 ++ app/javascript/mastodon/locales/fa.json | 2 ++ app/javascript/mastodon/locales/fi.json | 2 ++ app/javascript/mastodon/locales/fr.json | 2 ++ app/javascript/mastodon/locales/he.json | 2 ++ app/javascript/mastodon/locales/hr.json | 2 ++ app/javascript/mastodon/locales/hu.json | 2 ++ app/javascript/mastodon/locales/id.json | 2 ++ app/javascript/mastodon/locales/io.json | 2 ++ app/javascript/mastodon/locales/it.json | 2 ++ app/javascript/mastodon/locales/ja.json | 2 ++ app/javascript/mastodon/locales/ko.json | 2 ++ app/javascript/mastodon/locales/nl.json | 2 ++ app/javascript/mastodon/locales/no.json | 2 ++ app/javascript/mastodon/locales/oc.json | 2 ++ app/javascript/mastodon/locales/pl.json | 2 ++ app/javascript/mastodon/locales/pt-BR.json | 2 ++ app/javascript/mastodon/locales/pt.json | 2 ++ app/javascript/mastodon/locales/ru.json | 2 ++ app/javascript/mastodon/locales/th.json | 2 ++ app/javascript/mastodon/locales/tr.json | 2 ++ app/javascript/mastodon/locales/uk.json | 2 ++ app/javascript/mastodon/locales/zh-CN.json | 2 ++ app/javascript/mastodon/locales/zh-HK.json | 2 ++ app/javascript/mastodon/locales/zh-TW.json | 2 ++ 43 files changed, 171 insertions(+), 56 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index a816bffeff..2c264351ec 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -112,7 +112,7 @@ rules: jsx-a11y/iframe-has-title: warn jsx-a11y/img-has-alt: warn jsx-a11y/img-redundant-alt: warn - jsx-a11y/label-has-for: warn + jsx-a11y/label-has-for: off jsx-a11y/mouse-events-have-key-events: warn jsx-a11y/no-access-key: warn jsx-a11y/no-distracting-elements: warn diff --git a/app/javascript/mastodon/components/autosuggest_textarea.js b/app/javascript/mastodon/components/autosuggest_textarea.js index fa41e59e1f..35b37600fe 100644 --- a/app/javascript/mastodon/components/autosuggest_textarea.js +++ b/app/javascript/mastodon/components/autosuggest_textarea.js @@ -162,20 +162,23 @@ export default class AutosuggestTextarea extends ImmutablePureComponent { return (
-