diff --git a/packages/pl-fe/src/features/compose/editor/plugins/floating-text-format-toolbar-plugin.tsx b/packages/pl-fe/src/features/compose/editor/plugins/floating-text-format-toolbar-plugin.tsx index 6563e588f..61de50137 100644 --- a/packages/pl-fe/src/features/compose/editor/plugins/floating-text-format-toolbar-plugin.tsx +++ b/packages/pl-fe/src/features/compose/editor/plugins/floating-text-format-toolbar-plugin.tsx @@ -63,6 +63,14 @@ const messages = defineMessages({ }, insertLink: { id: 'compose_form.lexical.insert_link', defaultMessage: 'Insert link' }, blockType: { id: 'compose_form.lexical.block_type', defaultMessage: 'Change block type' }, + paragraph: { id: 'compose_form.lexical.block_type.paragraph', defaultMessage: 'Normal' }, + h1: { id: 'compose_form.lexical.block_type.h1', defaultMessage: 'Heading 1' }, + h2: { id: 'compose_form.lexical.block_type.h2', defaultMessage: 'Heading 2' }, + h3: { id: 'compose_form.lexical.block_type.h3', defaultMessage: 'Heading 3' }, + bulletList: { id: 'compose_form.lexical.block_type.bullet', defaultMessage: 'Bulleted list' }, + numberedList: { id: 'compose_form.lexical.block_type.number', defaultMessage: 'Numbered list' }, + quote: { id: 'compose_form.lexical.block_type.quote', defaultMessage: 'Quote' }, + codeBlock: { id: 'compose_form.lexical.block_type.code', defaultMessage: 'Code block' }, }); const blockTypeToIcon = { @@ -217,6 +225,7 @@ const BlockTypeDropdown = ({ onClick={formatParagraph} active={blockType === 'paragraph'} icon={blockTypeToIcon.paragraph} + aria-label={intl.formatMessage(messages.paragraph)} /> {composeAllowHeadings && ( <> @@ -226,6 +235,7 @@ const BlockTypeDropdown = ({ }} active={blockType === 'h1'} icon={blockTypeToIcon.h1} + aria-label={intl.formatMessage(messages.h1)} /> { @@ -233,6 +243,7 @@ const BlockTypeDropdown = ({ }} active={blockType === 'h2'} icon={blockTypeToIcon.h2} + aria-label={intl.formatMessage(messages.h2)} /> { @@ -240,6 +251,7 @@ const BlockTypeDropdown = ({ }} active={blockType === 'h3'} icon={blockTypeToIcon.h3} + aria-label={intl.formatMessage(messages.h3)} /> )} @@ -247,21 +259,25 @@ const BlockTypeDropdown = ({ onClick={formatBulletList} active={blockType === 'bullet'} icon={blockTypeToIcon.bullet} + aria-label={intl.formatMessage(messages.bulletList)} /> )} @@ -390,6 +406,7 @@ const TextFormatFloatingToolbar = ({ }} active={isBold} aria-label={intl.formatMessage(messages.formatBold)} + aria-label={intl.formatMessage(messages.formatBold)} icon={require('@phosphor-icons/core/regular/text-b.svg')} /> diff --git a/packages/pl-fe/src/locales/en.json b/packages/pl-fe/src/locales/en.json index 95965bf87..b40391cdf 100644 --- a/packages/pl-fe/src/locales/en.json +++ b/packages/pl-fe/src/locales/en.json @@ -636,6 +636,14 @@ "compose_form.hashtag_warning": "This post won't be listed under any hashtag as it is unlisted. Only public posts can be searched by hashtag.", "compose_form.interaction_policy.label": "Manage interaction policy", "compose_form.lexical.block_type": "Change block type", + "compose_form.lexical.block_type.bullet": "Bulleted list", + "compose_form.lexical.block_type.code": "Code block", + "compose_form.lexical.block_type.h1": "Heading 1", + "compose_form.lexical.block_type.h2": "Heading 2", + "compose_form.lexical.block_type.h3": "Heading 3", + "compose_form.lexical.block_type.number": "Numbered list", + "compose_form.lexical.block_type.paragraph": "Normal", + "compose_form.lexical.block_type.quote": "Quote", "compose_form.lexical.create_horizontal_line": "Create horizontal line", "compose_form.lexical.edit_link": "Edit link", "compose_form.lexical.format_bold": "Format bold",