Skip to content

Commit

Permalink
Adds a heading to the block inserters tips (WordPress#22863)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Todt committed Jun 4, 2020
1 parent bee8d1a commit 5524834
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/block-editor/src/components/inserter/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { includes } from 'lodash';
*/
import { useState } from '@wordpress/element';
import { LEFT, RIGHT, UP, DOWN, BACKSPACE, ENTER } from '@wordpress/keycodes';
import { TabPanel } from '@wordpress/components';
import { TabPanel, VisuallyHidden } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { useSelect } from '@wordpress/data';

Expand Down Expand Up @@ -92,6 +92,11 @@ function InserterMenu( {
</div>
{ showInserterHelpPanel && (
<div className="block-editor-inserter__tips">
<VisuallyHidden>

This comment has been minimized.

Copy link
@afercia

afercia Jun 4, 2020

Thanks for the PR!
I think this component accepts an as prop to render an element, e.g.:

<VisuallyHidden as="h2"> ...

which would simplify things and not require an (actually unused) CSS class.

<h2 className="block-editor-inserter__tips-title">
{ __( 'Tips for using the block editor:' ) }
</h2>
</VisuallyHidden>
<Tips />
</div>
) }
Expand Down

0 comments on commit 5524834

Please sign in to comment.