-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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: Change aria-label depending on content of paragraph block #11653
Conversation
Fix issue introduced in #11560
Thanks @tofumatt Additionally, quoting from #1659:
[sorry for my broken English]
The placeholder values:
|
I added a followup comment on the phrasing in #11560 (comment) — if that phrasing was intentional, then I won't be the blocker. But if it was a typo or slightly unintentional, do you think you could lump in the phrasing change in this PR? Thanks Matt. |
I added to 4.3 as it's smallish we can get it quickly in. |
I've updated the code to reflect the real state of this block; when empty it's functionally an empty block that by default accepts text to become a paragraph or the slash key to open the inserter. Now the label instructs users what is there; when there is content: the label "Paragraph Block" is read. When there is no content: "Empty block; start writing or type forward slash to choose a block" is read. I think that's a good solution for now. I also tweaked the text as per @jasmussen's request. |
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.
Approving based on content of placeholder. Thanks so much for this, it's way better, and should pair nicely with #11659 which makes the text not wrap on mobile or in columns.
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.
You may want to wait for a second (Joen beat me to it!) 👍, but this looks correct to me.
Fix issue introduced in #11560.
This only shows an
aria-label
forRichText
blocks when they aren't empty. I think it's a start; let me know if that fixes the issue I introduced in #11560#11560 (comment).