Skip to content

Commit

Permalink
pulled back package lock changes (+6 squashed commits)
Browse files Browse the repository at this point in the history
Squashed commits:
[45f9e1d18] regen e2e tests
[0c693404d] reverted extra ticket content
[9a274107c] remove comments
[a238724c7] removed aria label from menuItem component
[a72a05183] darked focus state outline for block lists
[a8a125dfb] local save
  • Loading branch information
Tim Wright authored and jorgefilipecosta committed Feb 1, 2019
1 parent 5134fcf commit 0bccf61
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 11 deletions.
5 changes: 0 additions & 5 deletions packages/components/src/menu-item/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import IconButton from '../icon-button';
*/
export function MenuItem( {
children,
label = children,
info,
className,
icon,
Expand All @@ -38,9 +37,6 @@ export function MenuItem( {
'has-icon': icon,
} );

// Avoid using label if it is passed as non-string children.
label = isString( label ) ? label : undefined;

if ( info ) {
const infoId = 'edit-post-feature-toggle__info-' + instanceId;

Expand Down Expand Up @@ -77,7 +73,6 @@ export function MenuItem( {
return createElement(
tagName,
{
'aria-label': label,
// Make sure aria-checked matches spec https://www.w3.org/TR/wai-aria-1.1/#aria-checked
'aria-checked': ( role === 'menuitemcheckbox' || role === 'menuitemradio' ) ? isSelected : undefined,
role,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
exports[`MenuItem should match snapshot when all props provided 1`] = `
<IconButton
aria-checked={true}
aria-label="My item"
className="components-menu-item__button my-class has-icon"
icon="wordpress"
onClick={[Function]}
Expand All @@ -20,7 +19,6 @@ exports[`MenuItem should match snapshot when all props provided 1`] = `
exports[`MenuItem should match snapshot when info is provided 1`] = `
<Button
aria-describedby="edit-post-feature-toggle__info-1"
aria-label="My item"
className="components-menu-item__button"
role="menuitem"
>
Expand All @@ -43,7 +41,6 @@ exports[`MenuItem should match snapshot when info is provided 1`] = `

exports[`MenuItem should match snapshot when isSelected and role are optionally provided 1`] = `
<IconButton
aria-label="My item"
className="components-menu-item__button my-class has-icon"
icon="wordpress"
onClick={[Function]}
Expand All @@ -59,7 +56,6 @@ exports[`MenuItem should match snapshot when isSelected and role are optionally

exports[`MenuItem should match snapshot when only label provided 1`] = `
<Button
aria-label="My item"
className="components-menu-item__button"
role="menuitem"
>
Expand Down
1 change: 0 additions & 1 deletion packages/components/src/menu-item/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ describe( 'MenuItem', () => {
</MenuItem>
);

expect( wrapper.prop( 'aria-label' ) ).not.toBeUndefined();
expect( wrapper ).toMatchSnapshot();
} );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ exports[`PluginMoreMenuItem renders menu item as button properly 1`] = `
role="menu"
>
<button
aria-label="My plugin button menu item"
className="components-button components-icon-button components-menu-item__button has-icon has-text"
onClick={[Function]}
role="menuitem"
Expand Down

0 comments on commit 0bccf61

Please sign in to comment.