Skip to content

Commit

Permalink
add role, name, posinset for paste in edgeMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
alanlong9278 committed Feb 28, 2020
1 parent 8b0510b commit b618c23
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,21 @@ const buildEdgeMenuItemsFromClipboardContext = (
);

const enablePaste = Array.isArray(clipboardActions) && clipboardActions.length > 0;
const menuItemCount = menuItems.length;
menuItems.unshift(
{
key: 'Paste',
name: 'Paste',
ariaLabel: 'Paste',
disabled: !enablePaste,
onRender: () => {
return (
<button
disabled={!enablePaste}
role="menuitem"
name="Paste"
aria-posinset={1}
aria-setsize={menuItemCount + 1}
css={css`
color: ${enablePaste ? '#0078D4' : '#BDBDBD'};
background: #fff;
Expand Down

0 comments on commit b618c23

Please sign in to comment.