about summary refs log tree commit diff
path: root/app/javascript/mastodon/components/icon_button.js
diff options
context:
space:
mode:
authorSorin Davidoi <sorin.davidoi@gmail.com>2017-07-29 01:58:53 +0200
committerEugen Rochko <eugen@zeonfederated.com>2017-07-29 01:58:53 +0200
commitc71874b84c1616f2a55547e1aa7cf81fc5c30636 (patch)
tree1fbcb09d493c84799884976d390ae6d7e7dab50b /app/javascript/mastodon/components/icon_button.js
parent53b2b1b2389c0ea941c50d4a9c726539d808c384 (diff)
Improve accessibility (part 6) (#4435)
* fix(status_action_bar): Use aria-pressed for reblog and favourite button

* fix(column_back_button): Keyboard accessible

* fix(status_content): Make focusable and accessible

* fix(dropdown_menu): Use aria-expanded instead of aria-pressed

* fix(emoji_picker_dropdown): Use aria-expanded instead of aria-hidden

* feat(icon_button): Add aria-expanded

* fix(privacy_dropdown): Use aria-expanded instead of aria-hidden
Diffstat (limited to 'app/javascript/mastodon/components/icon_button.js')
-rw-r--r--app/javascript/mastodon/components/icon_button.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/javascript/mastodon/components/icon_button.js b/app/javascript/mastodon/components/icon_button.js
index febdabbc0..3e5f8ac8c 100644
--- a/app/javascript/mastodon/components/icon_button.js
+++ b/app/javascript/mastodon/components/icon_button.js
@@ -13,6 +13,7 @@ export default class IconButton extends React.PureComponent {
     size: PropTypes.number,
     active: PropTypes.bool,
     pressed: PropTypes.bool,
+    expanded: PropTypes.bool,
     style: PropTypes.object,
     activeStyle: PropTypes.object,
     disabled: PropTypes.bool,
@@ -77,6 +78,7 @@ export default class IconButton extends React.PureComponent {
           <button
             aria-label={this.props.title}
             aria-pressed={this.props.pressed}
+            aria-expanded={this.props.expanded}
             title={this.props.title}
             className={classes.join(' ')}
             onClick={this.handleClick}