Roux Components v1#17
Conversation
Also started a "sizing" set of utility classes, starting with widths
Uses 11ty to generate a static site for displaying a component library built with Roux.
- Set pathPrefix to /roux/ in production via SITE_ENV variable - Update CSS link to use Eleventy's url filter (to set the path prefix in prod) - Simplify deploy script environment variables
enatario
left a comment
There was a problem hiding this comment.
AMAZING WORK! TRULY!
I think my only questions are:
- Can we pair on this to go through it all together? I feel like I have mostly a handle on the breadth but might be good to just do a check all together.
- It seems like we still might not be compiling the CSS into one file. I wonder how we can achieve that across the board since we push that in our docs. I know we had used lightning css before but it was tricky with this particular setup.
|
|
||
| ## Considerations | ||
|
|
||
| We use a simple `<div class="alert">` structure with modifier classes (e.g., `alert--success`, `alert--danger`) so visual styling is predictable and easy to extend. Each alert includes an appropriate ARIA live-region role: |
There was a problem hiding this comment.
Should we include some information about aria-live regions for this as they often go hand-in-hand with these types of components? Maybe not necessarily baked into the component itself.
There was a problem hiding this comment.
I can link to MDN's page about live regions.
Are you suggesting we add an explanation of what they are right here? And are you also suggesting we remove the role attributes from the component examples?
|
|
||
| ## Considerations | ||
|
|
||
| If badges contain just a number or text that requires extra context, you should provide that context with a visually-hidden element. For example, a badge on a mail icon displaying "12" should read `12 <span class="u-hide-visually">unread messages</span>` so that assistive tech understands the intent. Or to be even more clear, include the label visible inside the badge: `12 unread messages` |
|
|
||
| ::preview{file="dialogs/basic.html" id="example_basic_modal" tall="true"}:: | ||
|
|
||
| ### Slide-in Drawer Modal |
There was a problem hiding this comment.
I think I might want to update the CSS on this before launch to invert the animation and have it default to no animation and then create an opt-in approach (so using no-preference as the modifier instead of reduce).
|
|
||
| ## Considerations | ||
|
|
||
| Loaders should use either the `alert` or `status` ARIA roles. Use the "alert" role when the user needs to know immediately when loading finishes: for example, when submitting a form. This role causes assistive technologies to announce all changes in an assertive way, and could be annoying. Use the "status" role when the loading state is doesn't need immediate attention: for example, when loading extra page content. |
There was a problem hiding this comment.
Should we link to those roles on MDN?
|
|
||
| ## Considerations | ||
|
|
||
| Be sure to use headline levels in order (H1 followed by H2, etc) so that assistive technologies can navigate the page. Skipping a headline level causes confusion. |
There was a problem hiding this comment.
Perhaps we should also just tell folks to lean into typographic elements instead of plain divs where appropriate as well. The amount of divs I've seen that should be a p tag is astounding
| title: Spinning Loading Indicator | ||
| --- | ||
|
|
||
| <div aria-busy="true"> |
|
|
||
| Much like Roux CSS, these components are meant as a baseline for you to build on top of, so feel free to adjust as needed. They're flexible and extendable, but opinionated about what matters. | ||
|
|
||
| All components are accessible and semantic by default. |
There was a problem hiding this comment.
| All components are accessible and semantic by default. | |
| All components aim to be accessible and semantic by default. |
Scheduled!
I will work on this! |
This PR merges the working Roux Components branch into
main.What this adds:
/sitedirectory).button:disabledstylesblockquotestyles