From e84ae0d8a213b9d3df154df02819ff71be43031d Mon Sep 17 00:00:00 2001 From: Frederic Hemberger Date: Sun, 2 Sep 2018 15:51:06 +0200 Subject: [PATCH] Add aria-label to floatingActionButton (#8574) --- .../mastodon/features/ui/components/columns_area.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/javascript/mastodon/features/ui/components/columns_area.js b/app/javascript/mastodon/features/ui/components/columns_area.js index 3ab867b5a7..a72ba06ab7 100644 --- a/app/javascript/mastodon/features/ui/components/columns_area.js +++ b/app/javascript/mastodon/features/ui/components/columns_area.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { injectIntl } from 'react-intl'; +import { defineMessages, injectIntl } from 'react-intl'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; @@ -29,6 +29,10 @@ const componentMap = { 'LIST': ListTimeline, }; +const messages = defineMessages({ + publish: { id: 'compose_form.publish', defaultMessage: 'Toot' }, +}); + const shouldHideFAB = path => path.match(/^\/statuses\//); @component => injectIntl(component, { withRef: true }) @@ -149,14 +153,14 @@ export default class ColumnsArea extends ImmutablePureComponent { } render () { - const { columns, children, singleColumn, isModalOpen } = this.props; + const { columns, children, singleColumn, isModalOpen, intl } = this.props; const { shouldAnimate } = this.state; const columnIndex = getIndex(this.context.router.history.location.pathname); this.pendingIndex = null; if (singleColumn) { - const floatingActionButton = shouldHideFAB(this.context.router.history.location.pathname) ? null : ; + const floatingActionButton = shouldHideFAB(this.context.router.history.location.pathname) ? null : ; return columnIndex !== -1 ? [