-
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
Update handling of empty template description cell #56394
Conversation
Size Change: +254 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
) : ( | ||
<> | ||
<Text variant="muted" aria-hidden="true"> | ||
{ __( '—' ) } |
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.
Unsure if this needs to be translatable 🤔
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.
It's not a translatable string in core, so I think you can use the same decision here. I suggest using the same character as is used in core, for consistency: —
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.
Update visible 'no data' character to not be translatable & use same character as core. Otherwise, I think this is fine. It maybe should be abstracted out for better reusability; as data views are developed more broadly, there will be a common need for rendering empty cells, and each may need a different text string.
I agree, but I don't know that it needs to prohibit this PR unless it is easy to do. Any thoughts @ntsekouras? |
I'll bow to @ntsekouras as to whether this should be abstracted now or handle it later. From a functional perspective, I think this is fine, however. |
Do you think we should close this since @jameskoster added similar changes here, that's going to land soon? I'm saying this just because there are subtle differences about not using Regarding the abstraction, let's do it separately since there are some nuances on how to know if the used component eventually renders something or not. I've added a task in the main tracking issue. |
Yes, good point, let's close this. |
What?
Display a dash (–) when the template has no description. Include a more verbose "No description." message for screen readers.
Why?
An empty cell can give the impression that the data failed to load.
How?
Copies the same technique used to handle empty cells in wp-admin:
–
witharia-hidden="true"
.Testing Instructions