Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix focus style of social icons with no link yet #64972

Open
2 tasks done
afercia opened this issue Sep 2, 2024 · 4 comments
Open
2 tasks done

Fix focus style of social icons with no link yet #64972

afercia opened this issue Sep 2, 2024 · 4 comments
Labels
[Block] Social Affects the Social Block - used to display Social Media accounts [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Design Needs design efforts. [Type] Bug An existing feature does not function as intended

Comments

@afercia
Copy link
Contributor

afercia commented Sep 2, 2024

Description

Noticed while testing #64883

When adding social icons, the focus style and the state of a social icon that hasn't a link set yet are problematic.

  • The focus style is altered by the opacity set on the social icon. The social icon button is focused but the focus style isn't standard. This issue is very similar to the one fixed in Button: Improve the aria-disabled focus style #62480. No matter what is the state of a control, the focus style needs to be clearly visible and standard.

Screenshot: The Instagram icon isn't linked yet. Notice the opacity alters the focus style. Instead, the GitHub icon is linked. The focus style is the standard one.

Screenshot 2024-09-02 at 09 38 05

  • The state of a non-linked social icon is only communicated visually by the opacity. This is insufficient and not accessible as the state is only communicated via a different color produced by the opacity. There's no other indication od the different state of the icons. Color alone is not sufficient. The different state must be communicated via a shape.

Screenshot: the GitHub icon does have a link set, the Instagram one doesn't:

Screenshot 2024-09-02 at 09 33 25

@WordPress/gutenberg-design please provide a new design where the state is communicated via a meaningful, understandable sahpe.

Step-by-step reproduction instructions

  • Add a Social icons block.
  • Add an icon with a link and another icon without a link.
  • Compare the visuals of the different states.
  • Compare the focus style of the two icons.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes
@afercia afercia added [Type] Bug An existing feature does not function as intended [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Design Needs design efforts. [Block] Social Affects the Social Block - used to display Social Media accounts labels Sep 2, 2024
@afercia
Copy link
Contributor Author

afercia commented Sep 2, 2024

How about using the warning icon and removing any opacity? Roughly:

Screenshot 2024-09-02 at 16 10 49

Maybe a new icon to indicate a missing link would be more meaningful.

@t-hamano
Copy link
Contributor

t-hamano commented Sep 2, 2024

As for the design, I don't have any good ideas at the moment, but apart from that, is there any need to improve the way screen readers read when no links are set? Unlike other blocks, I think the social icon block is expected to always have links applied.

@afercia
Copy link
Contributor Author

afercia commented Sep 3, 2024

is there any need to improve the way screen readers read when no links are set?

In the editor: the icon should render even with no link set and an appropriate visual indication and label should clearly communicate the icon misses a link.
On the front end: I'd tend to think a social icon with no link should no render at all.

@hanneslsm
Copy link

How about using the warning icon and removing any opacity? Roughly:

Interesting idea. The icons block is definitely a special case, but let's not forget we have also blocks that currently use a opacity when they are not rendered in the frontend, like the "Read more" link in a Post Template or "Previous Page" and "Next Page" in the Pagination block.
CleanShot 2024-09-04 at 09 25 44@2x
And then, of course, there are image placeholders without opacity.

I guess what I'm trying to say is that we should look holistically from UX and UI standpoint at that topic "placeholders" / what's displayed on the editor but not frontend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Social Affects the Social Block - used to display Social Media accounts [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Design Needs design efforts. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants