diff --git a/blocks/api/categories.js b/blocks/api/categories.js index e1343f3b984632..0e97bfdf8eae90 100644 --- a/blocks/api/categories.js +++ b/blocks/api/categories.js @@ -5,7 +5,7 @@ * @var {Array} categories */ const categories = [ - { slug: 'common', title: 'Common' } + { slug: 'common', title: 'Common blocks' } ]; /** diff --git a/editor/components/icon-button/style.scss b/editor/components/icon-button/style.scss index e3e6d84083ea09..bf2c4915d672eb 100644 --- a/editor/components/icon-button/style.scss +++ b/editor/components/icon-button/style.scss @@ -1,8 +1,7 @@ .editor-icon-button { display: flex; align-items: center; - min-width: 36px; - height: 36px; + padding: 8px; border: none; background: none; color: $dark-gray-500; diff --git a/editor/components/inserter/index.js b/editor/components/inserter/index.js index ad9eee3450c057..cb74a423946b6a 100644 --- a/editor/components/inserter/index.js +++ b/editor/components/inserter/index.js @@ -49,7 +49,9 @@ class Inserter extends wp.element.Component { icon="insert" label={ wp.i18n.__( 'Insert block' ) } onClick={ this.toggle } - className="editor-inserter__toggle" /> + className="editor-inserter__toggle" + aria-haspopup="true" + aria-expanded={ opened ? 'true' : 'false' } /> { opened && } ); diff --git a/editor/components/inserter/menu.js b/editor/components/inserter/menu.js index 1e4a08b1ac85ab..f6a5954faf2308 100644 --- a/editor/components/inserter/menu.js +++ b/editor/components/inserter/menu.js @@ -16,6 +16,7 @@ class InserterMenu extends wp.element.Component { filterValue: '' }; this.filter = this.filter.bind( this ); + this.instanceId = this.constructor.instances++; } filter( event ) { @@ -55,10 +56,22 @@ class InserterMenu extends wp.element.Component { { categories .map( ( category ) => !! blocksByCategory[ category.slug ] && (
-
{ category.title }
-
+ +
{ blocksByCategory[ category.slug ].map( ( { slug, title, icon } ) => (