-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Post: add backdate warning #25569
Post: add backdate warning #25569
Conversation
Size Change: +230 B (0%) Total Size: 1.17 MB
ℹ️ View Unchanged
|
This is looking great! I pushed a quick spacing adjustment. Here are current screenshots: For that second one, I wish we could hide the border above the notice, but my brain is blocked thinking of a way to do that with CSS. 🤔 Two other quick bugs:
|
I guess we can just use a class? |
@kjellr Like this? |
Yes, exactly! |
I guess it would be nice if somehow it could be part of the button. Not sure what makes most sense in this case. |
We shouldn't be adding this as a separate section from the main Post Schedule section, as semantically that makes no sense. It also can't be part of the accordion's button text since that would mess up the (already not ideal) semantics/a11y. (The "Publish: PUBLISH DATE" label is not the right kind of button label. It should just be "Publish date" or something like that.) The correct way to show this kind of information (both the current publish date and any important warning notice) would be through a summary that is separate from the button+heading of the accordion, but still part of the accordion, and shown when the accordion is collapsed. Luckily, I've already implemented this in #25170, so I'd suggest checking out that PR and helping it get merged. Without the summary prop API, I think the best we can do is put the warning inside the main content of the accordion, which would risk users not even realizing its there if they don't open the accordion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally agree this info shouldn't be part of the panel button, as it would break the accordion semantics and accessibility: this is an info that is extraneous to the button's purpose. Also, as mentioned by @ZebulanStanphill, the Visibility and Publish panels accessibility is finally going to be fixed in #25170 and #24024 and this extraneous info would break that attempt.
Regarding the notice, seems to me this message is important enough to interrupt the user's flow (and interrupt whatever a screen reader is announcing in that moment) so I'd consider to make the speak()
message assertive. I think this can be done by passing a politeness="assertive"
propo to the Notice.
From a visual perspective, worth noting the first notice will appear behind the datepicker and it will be almost entirely hidden. Users would need to first close the datepicker to be able to see the notice:
This is more a design thing but I thought to note it anyways.
Description
Adds a notice to posts when the "scheduled" publish date is in the past.
Addresses #13230.
How has this been tested?
Screenshots
Types of changes
Checklist: