Improve avatar status accessibility and update CSS hash - #232
Conversation
Added role and aria-label attributes to avatar status indicators for better accessibility in documentation examples. Updated the CSS SRI hash in hugo.yml to match the referenced stylesheet.
There was a problem hiding this comment.
Pull request overview
This pull request updates accessibility attributes for avatar status indicators, refreshes copyright years to 2026, and updates the CSS Subresource Integrity hash. The PR addresses three distinct areas: accessibility enhancements for avatar components, documentation maintenance through copyright updates, and asset integrity verification.
Changes:
- Added
role="status"andaria-labelattributes to avatar status indicators in documentation examples - Updated copyright years from 2025 to 2026 in README.md for both Bootstrap and Modus Bootstrap
- Updated SRI hash for Modus Bootstrap CSS v2.3.1 in hugo.yml configuration
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| site/content/docs/v2/components/avatar.md | Added ARIA attributes (role="status" and aria-label) to all avatar status indicator examples for accessibility |
| README.md | Updated copyright years from 2025 to 2026 for Bootstrap and Modus Bootstrap |
| hugo.yml | Updated CSS SRI hash for Modus Bootstrap v2.3.1 CDN resource |
| <span class="avatar-status status-online" role="status" aria-label="Online"></span> | ||
| </span> | ||
| <span class="avatar"> | ||
| <img class="avatar-img" src="https://github.com/coliff.png" alt="CO"> | ||
| <span class="avatar-status status-offline"></span> | ||
| <span class="avatar-status status-offline" role="status" aria-label="Offline"></span> | ||
| </span> | ||
| <span class="avatar"> | ||
| <img class="avatar-img" src="https://github.com/coliff.png" alt="CO"> | ||
| <span class="avatar-status status-busy"></span> | ||
| <span class="avatar-status status-busy" role="status" aria-label="Busy"></span> | ||
| </span> | ||
| <span class="avatar"> | ||
| <img class="avatar-img" src="https://github.com/coliff.png" alt="CO"> | ||
| <span class="avatar-status status-away"></span> | ||
| <span class="avatar-status status-away" role="status" aria-label="Away"></span> |
There was a problem hiding this comment.
The use of role="status" for avatar status indicators is semantically incorrect. The ARIA status role is intended for live regions that provide advisory information that changes dynamically (e.g., "5 results found" or "Saving..."). Avatar status indicators are static visual decorations that don't change content dynamically in the DOM.
For these purely decorative status indicators, consider one of these approaches:
- Use
role="img"witharia-labelif the status is important enough to be announced - Use
aria-hidden="true"if the status is conveyed through other means (e.g., the avatar is in a list that textually indicates status) - If status needs to be announced, ensure the parent avatar element has appropriate accessible text that includes the status
The role="status" with its implicit aria-live="polite" will cause screen readers to announce these every time they encounter them, which may not be the intended behavior for static status indicators.
| <span class="avatar-status status-online" role="status" aria-label="Online"></span> | ||
| </span> | ||
| <span class="avatar avatar-sm"> | ||
| <img class="avatar-img" src="https://github.com/coliff.png" alt="CO"> | ||
| <span class="avatar-status status-online"></span> | ||
| <span class="avatar-status status-online" role="status" aria-label="Online"></span> | ||
| </span> | ||
| <span class="avatar"> | ||
| <img class="avatar-img" src="https://github.com/coliff.png" alt="CO"> | ||
| <span class="avatar-status status-online"></span> | ||
| <span class="avatar-status status-online" role="status" aria-label="Online"></span> | ||
| </span> | ||
| <span class="avatar avatar-lg"> | ||
| <img class="avatar-img" src="https://github.com/coliff.png" alt="CO"> | ||
| <span class="avatar-status status-online"></span> | ||
| <span class="avatar-status status-online" role="status" aria-label="Online"></span> | ||
| </span> | ||
| <span class="avatar avatar-xl"> | ||
| <img class="avatar-img" src="https://github.com/coliff.png" alt="CO"> | ||
| <span class="avatar-status status-online"></span> | ||
| <span class="avatar-status status-online" role="status" aria-label="Online"></span> |
There was a problem hiding this comment.
The use of role="status" for avatar status indicators is semantically incorrect. The ARIA status role is intended for live regions that provide advisory information that changes dynamically (e.g., "5 results found" or "Saving..."). Avatar status indicators are static visual decorations that don't change content dynamically in the DOM.
For these purely decorative status indicators, consider one of these approaches:
- Use
role="img"witharia-labelif the status is important enough to be announced - Use
aria-hidden="true"if the status is conveyed through other means (e.g., the avatar is in a list that textually indicates status) - If status needs to be announced, ensure the parent avatar element has appropriate accessible text that includes the status
The role="status" with its implicit aria-live="polite" will cause screen readers to announce these every time they encounter them, which may not be the intended behavior for static status indicators.
This pull request introduces improvements to accessibility for avatar status indicators in the documentation, updates copyright years, and refreshes the Subresource Integrity (SRI) hash for the Modus Bootstrap CSS file. The main changes are grouped below:
Accessibility Enhancements:
role="status"andaria-labelattributes to.avatar-statuselements inavatar.mdto improve accessibility for screen readers. [1] [2]Documentation and Metadata Updates:
README.md.Asset Integrity Maintenance:
hugo.ymlto match the latest release.