GithubHelp home page GithubHelp logo

Comments (3)

afercia avatar afercia commented on July 17, 2024

For a new, more meaningful, aria-label for the link preview it's worth reminding the link preview can show a few things that are conceptually different.

The fetched information of an external site displayed in a 'rich data' preview, including the site icon:

fetched

Same for an internal link.

Or, if the link destination page can't be fetched, it will display a generic icon, the link text, and the link url with the protocol part stripped out:

not fetched

Or, when the link text is the same as the link url, it may show only the link:

image

Given this UI can show different things, sometimes it may actually not be a 'preview'. A new, more meaningul, labeling should likely avoid the term 'preview' and use a more generic terminology to commuincate users this is generic information about the destination page.

from gutenberg.

afercia avatar afercia commented on July 17, 2024

Note: translatable should avoid concatenation. In the case illustrated below, the colon : is not translatable.
The WordPress l10n guidelines recomment to always use fully translatable strings, including punctuation.

label={ sprintf(
// Translators: %s is a placeholder for the link URL and an optional colon, (if a Link URL is present).
__( 'Copy link%s' ), // Ends up looking like "Copy link: https://example.com".
isEmptyURL || showIconLabels ? '' : ': ' + value.url
) }

from gutenberg.

afercia avatar afercia commented on July 17, 2024

Additionally: when the preference 'Show button text labels' is enabled, all three buttons still show the tooltips, they just repeat the visible text. That's redundant and should be avoided as it's done for other buttons in the UI.

Screenshot:

Screenshot 2024-04-19 at 15 22 29

from gutenberg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.