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

💄 style: improve navigation bar & metadata wrapping #425

Merged
merged 3 commits into from
Nov 11, 2024

Conversation

welpo
Copy link
Owner

@welpo welpo commented Nov 9, 2024

Summary

Improves wrapping of navigation bar icons —grouping them together for wrapping— and post metadata (see screenshots).

Changes

  • Group wrapped navigation icons
  • Make metadata 'separator' unselectable
  • Better wrapping of article metadata:
    • Tags never get split
    • Separator uses a class instead of non-breaking spaces
    • Elements are joined with their separator
    • Elements starting in a new line (due to wrapping), do not get space before the separator

Accessibility

Improved: adds aria-hidden="true" to the separator. This prevents screen readers from announcing decorative content that could be distracting or redundant.

The list structure (<li> elements) already provides sufficient context for understanding that these are related but separate pieces of information. Before, the screen reader would announce something like "January 1, 2024 bullet 5 min read". With aria-hidden="true", the screen reader would simply announce: "January 1, 2024 5 min read"

Tabbing works as before.

Screenshots

Before

beefore

Note:

  • lone theme switcher icon

After

aafter

Before

before2

Note:

  • "5 min read" odd wrapping
  • "FAQ" tag wrapped mid-word

After

after2

Note how the Tags separator starts where one would expect. Before, with the forced non-breaking spaces, it would include space before the separator.

Type of change

  • Bug fix (fixes an issue without altering functionality)
  • New feature (adds non-breaking functionality)
  • Breaking change (alters existing functionality)
  • UI/UX improvement (enhances user interface without altering functionality)
  • Refactor (improves code quality without altering functionality)
  • Documentation update
  • Other (please describe below)

Checklist

  • I have verified the accessibility of my changes
  • I have tested all possible scenarios for this change
  • I have updated theme.toml with a sane default for the feature
  • I have made corresponding changes to the documentation:
    • Updated config.toml comments
    • Updated theme.toml comments
    • Updated "Mastering tabi" post in English
    • (Optional) Updated "Mastering tabi" post in Spanish
    • (Optional) Updated "Mastering tabi" post in Catalan

- Group wrapped navigation icons
- Better wrapping of article metadata:
  - Tags never get split
  - Separator uses a class instead of non-breaking spaces
  - Elements are joined with their separator
  - Elements starting in a new line (due to wrapping), do not get space before the separator
@welpo welpo added the enhancement New feature or request label Nov 9, 2024
Copy link

netlify bot commented Nov 9, 2024

Deploy Preview for tabi-demo ready!

Name Link
🔨 Latest commit 79a4b5a
🔍 Latest deploy log https://app.netlify.com/sites/tabi-demo/deploys/6732433aea85e70008dbdf8a
😎 Deploy Preview https://deploy-preview-425--tabi-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@welpo welpo changed the title 💄style: improve navigation bar & metadata wrapping 💄 style: improve navigation bar & metadata wrapping Nov 9, 2024
@welpo welpo force-pushed the style/better-metadata-and-navbar-wrapping branch from 22a2513 to 79a4b5a Compare November 11, 2024 17:47
@welpo welpo merged commit 42f9bb9 into main Nov 11, 2024
7 checks passed
@welpo welpo deleted the style/better-metadata-and-navbar-wrapping branch November 11, 2024 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant