Skip to content

Conversation

@leutrimhusaj
Copy link
Contributor

Description

I introduced a new prop for the menu-item and the button, called externalLink. It is an indicator if the menu-item/button is used as an external link which needs to have a icon (external) and a visually hidden text for screenreader users.
If the prop is set to true, the menu-item clones the external icon which is imported to the current icon, because there should be only one icon displayed and gives the new icon and externalLink prop to the button. The button displays now the the external icon and the visually hidden text, on an a or button tag.
This is an alternative proposal for issue #24539

How has this been tested?

Open gutenberg editor for a page and the new FSE-Editor.
Open the "more option" menu and check/click the help button.

Screenshots

help-with-external-icon

Types of changes

New feature (non-breaking change which adds functionality)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant