From 1a6e13a4e5f75b0b2158d43a16b73b54725cf637 Mon Sep 17 00:00:00 2001 From: Frederic Hemberger Date: Wed, 2 Nov 2016 14:53:39 +0100 Subject: [PATCH] a11y: Add labels to input fields for screenreader See: https://dequeuniversity.com/rules/axe/2.1/label --- .../components/features/ui/components/compose_form.jsx | 1 + .../components/features/ui/components/follow_form.jsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/components/features/ui/components/compose_form.jsx b/app/assets/javascripts/components/features/ui/components/compose_form.jsx index 0655a7c79f..581e28fc97 100644 --- a/app/assets/javascripts/components/features/ui/components/compose_form.jsx +++ b/app/assets/javascripts/components/features/ui/components/compose_form.jsx @@ -132,6 +132,7 @@ const ComposeForm = React.createClass({ const inputProps = { placeholder: 'What is on your mind?', + ariaLabel: 'What is on your mind?', value: this.props.text, onKeyUp: this.handleKeyUp, onChange: this.handleChange, diff --git a/app/assets/javascripts/components/features/ui/components/follow_form.jsx b/app/assets/javascripts/components/features/ui/components/follow_form.jsx index 4ba5dfc258..be80b76637 100644 --- a/app/assets/javascripts/components/features/ui/components/follow_form.jsx +++ b/app/assets/javascripts/components/features/ui/components/follow_form.jsx @@ -33,7 +33,7 @@ const FollowForm = React.createClass({ render () { return (
- +
);