-
Notifications
You must be signed in to change notification settings - Fork 67
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(page-notice): fixed paragraph-only positioning #1886
Conversation
I believe section notice and inline notice both have their icons misaligned still. We should try to fix those as part of this PR |
I think that makes sense for <div class="section-notice section-notice--attention" role="region">
<div class="section-notice__header" role="region" aria-roledescription="Notice">
<svg aria-hidden="true" focusable="false" class="icon--attention-filled-small">
<use href="#icon-attention-filled-small"></use>
</svg>
</div>
<div class="section-notice__main">
<h3 class="section-notice__title">Add required aspects to keep item live.</h3>
</div>
<div class="section-notice__footer">
<button class="fake-link">Dismiss</button>
</div>
</div> This would need to be the structure variation to support that change: <div class="section-notice section-notice--attention" role="region">
<div class="section-notice__header" role="region" aria-roledescription="Notice">
<svg aria-hidden="true" focusable="false" class="icon--attention-filled-small">
<use href="#icon-attention-filled-small"></use>
</svg>
</div>
<div class="section-notice__main">
<p>Add required aspects to keep item live.</p>
</div>
<div class="section-notice__footer">
<button class="fake-link">Dismiss</button>
</div>
</div> It looks to me that styling like this was to accommodate normal styling (looks like .page-notice__title {
font-size: @font-size-regular;
font-weight: normal;
margin: 4px 0 0;
}
/* legacy version with separate bold heading */
.page-notice__title:not(:only-child) {
font-weight: bold;
} I actually had some hesitations about even making the fix for the page notice. So, I guess the question is do we want to promote the usage of the page/section notice with just the @ianmcburnie , any thoughts on this? |
Hmm.. does Figma really help answer the question though? I think that is way too upstream and limited. I don't think design can/should prescribe the actual tags we use, just the way things look. My question has to do more with the actual tags - semantics and a11y. Figma's specs of "without" title doesn't really take the actual tags into consideration; not sure it answers the question. We have headings we make look like untitled variations. |
Not sure if I understand correctly. |
To me, this seems to be saying that a heading is always needed because it makes an affordance for when it's alone: .page-notice__title {
font-size: @font-size-regular;
font-weight: normal;
margin: 4px 0 0;
}
/* legacy version with separate bold heading */
.page-notice__title:not(:only-child) {
font-weight: bold;
} And when it's the only thing in the container, it gets treated more like a |
I believe that legacy version is for ds4. So it probably shouldn’t be relied on. |
Fixes #1868
Description
I fixed notices which only had a
<p>
and no<h2>
.Screenshots
Before:
After:
Checklist