Skip to content

Update: Improve checkbox clickable area and styling#73312

Open
enejb wants to merge 4 commits intotrunkfrom
update/checkbox-control
Open

Update: Improve checkbox clickable area and styling#73312
enejb wants to merge 4 commits intotrunkfrom
update/checkbox-control

Conversation

@enejb
Copy link
Copy Markdown
Contributor

@enejb enejb commented Nov 14, 2025

Wraps the checkbox input in an additional span to expand the clickable area, improving accessibility and usability. Adds new styles for the expanded area, including hover effects and proper positioning.

This PR expands increase the click area of the checkbox and adds a hover backgound so that it is more clear to the user what checkbox will be selected.

This PR is a follow up to #73146

What?

  • Adds a span that is clickable so has a hover class that increases the click area of checkboxes.

Why?

Checkboxes can be hard to click since the click area is so small and in Dataview this can be an issue since missclicking a checkbox selection can cause the user to loose the selection.

How?

We add a new span that wraps the current checkbox. We absolute position this new chechbox area so that it shows up in the same place as before.

Testing Instructions

Visit the storybook and noctice that eveything still works as before.
But now when you have a checkbox you also see the new cirlcle background when you hover over a checkbox.

Testing Instructions for Keyboard

Key board should work as before.

Screenshots or screencast

Screen.Recording.2025-11-27.at.3.12.54.PM.mov

@enejb enejb requested a review from ajitbohra as a code owner November 14, 2025 19:25
@enejb enejb added [Type] Enhancement A suggestion for improvement. Needs Design Feedback Needs general design feedback. [Feature] UI Components Impacts or related to the UI component system labels Nov 14, 2025
@jameskoster jameskoster requested a review from a team November 17, 2025 09:47
@jameskoster jameskoster added the [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). label Nov 17, 2025
@jameskoster jameskoster requested a review from a team November 17, 2025 09:48
Comment on lines +79 to +81
padding: 8px;
margin-left: -8px;
margin-top: -8px;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess these could be based on --checkbox-input-size?

margin-top: -8px;
width: calc(var(--checkbox-input-size) + 16px);
height: calc(var(--checkbox-input-size) + 16px);
transition: cubic-bezier(0.075, 0.82, 0.165, 1) background-color 150ms;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this based on existing animation profiles? Do you think it's necessary to animate?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also consider enabling this styling within a @media not (prefers-reduced-motion) media query, since it doesn't seem especially essential.

Related: https://www.w3.org/WAI/WCAG21/Understanding/animation-from-interactions.html

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should animate at this level. I would approach motion from higher UI levels, like content areas, rather than from components. The former needs to convey more complex interactions and concepts, so when in pages where transitions exist, this component-level motion can feel overwhelming.

.components-checkbox-control__input-container-area:hover {
cursor: pointer;
background-color: color-mix(in srgb, $components-color-accent 8%, $white);
border-radius: 50%;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's a radius var you could use here.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 17, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: enejb <enej@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
Co-authored-by: aduth <aduth@git.wordpress.org>
Co-authored-by: fcoveram <fcoveram@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@jasmussen
Copy link
Copy Markdown
Contributor

I'm pausing a bit on the added hover state. From the papertrail I see the motivation for adding it, and the circle is not an offensive visual. It just seems designwise like a one-off: do we have a vernacular for hover states that this can tap into? At present some have a gray hover style, some only colorize the text blue, some have a light blue style, and there's no language I can find that suggests a radius much less a circle. Should we have hover states on inputs? ToggleControls? Radios?

I don't know it's a blocker, I just also don't know that we need to have that hover state from the get-go, it seems fine to only increase the clickable area, and not do anything else.

The main thing I want to avoid is that we end up with still more bespoke hover styles, and then a future task to clean it all up if we find out a new design for it.

But if you all feel strongly about this circle, no blockers from my end. Nice work, and thanks for the ping.

padding: 8px;
margin-left: -8px;
margin-top: -8px;
width: calc(var(--checkbox-input-size) + 16px);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think +8px would achieve the minimum required 24px target size?

@jameskoster
Copy link
Copy Markdown
Contributor

Styled hover states for inputs are really helpful indicators of interactivity and make the UI feel more responsive. So my preference would be to add this feature with a hover style if possible, and iterate to refine if necessary.

A potential alternative to the fully-rounded target would be to use a shadow so the target inherits the radius from the checkbox:

Screenshot 2025-11-17 at 10 49 09

@jasmussen
Copy link
Copy Markdown
Contributor

For me the question is less about whether to have a hover style, or even what it looks like, it's rather that we have some idea of what do our hover styles look like in general, so we don't add even more treatments into the mix.

@jameskoster
Copy link
Copy Markdown
Contributor

I think it's kind of unavoidable that the checkbox will have a fairly unique treatment though because it's the only component that has a larger click target than the visible element. The only existing style I could think to mimic is the handle in range control. Maybe this would work:

checkbox

@jasmussen
Copy link
Copy Markdown
Contributor

jasmussen commented Nov 17, 2025

Those all look okay enough to me, the point remains though, the color, shape, transition, opacity, all of those are values that would be good to systematize so that we have a catalog of materials to tap into. E.g. my point around radio and toggle feel valid here too: why just this one, and not all of them? And I'm still unconvinced we need the hover style at all: the win here is the bigger click target, and that is indicated by the hand cursor. Similarly you can click the label next to the checkbox, that doesn't have a hover style despite toggling it. And finally, what does this look like in DataViews, where the entire row has a hover style, does it conflict with it or do they blend in?

All of those are solvable problems, and although it may read as a strong opinion, I assure you it's not. While I may have a preference going in one direction, if we feel confident that the code is clean and easy to update if we do go back and systematize hover states at a later time, then we can move forward.

margin-top: -8px;
width: calc(var(--checkbox-input-size) + 16px);
height: calc(var(--checkbox-input-size) + 16px);
transition: cubic-bezier(0.075, 0.82, 0.165, 1) background-color 150ms;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also consider enabling this styling within a @media not (prefers-reduced-motion) media query, since it doesn't seem especially essential.

Related: https://www.w3.org/WAI/WCAG21/Understanding/animation-from-interactions.html

@fcoveram
Copy link
Copy Markdown
Contributor

I agree with Joen that we don’t need to style the hover. Improving the target area to meet the minimum size is a win, but the current behavior seems to meet the requirements.

It also worries me how this works in DataViews. In the current heuristic, the row’s gray background suggests which content will be selected, but in this approach, it feels odd to set the pointer over the checkbox label without modifying it.

@jameskoster
Copy link
Copy Markdown
Contributor

and that is indicated by the hand cursor

It's not clear we'll use the hand cursor forever. I've seen it mentioned elsewhere that this cursor should be reserved only for hyperlinks. With very few exceptions interactive components should inherently indicate hover state.

I am happy to disagree and commit though. We can add the hover styling later/separately.

@mirka
Copy link
Copy Markdown
Member

mirka commented Nov 19, 2025

I also have concerns with adding a visual hover style like this. Checkboxes tend to be used in many different contexts, for example floated on top of an arbitrary image, or placed within a pill-like border with its label. The more prominent the hover style, the more difficulties we're going to have reconciling with the different contexts.

What gives me even more pause is the stated motivation (#73146) for the increasing of the click target:

checkbox are sometimes hard to click on desktop since if you miss just by a little bit you loose your selection and have to start all over again.

A few extra pixels of click target buffer is not going to save me from the frustration of having to start over because of a misclick. Could we maybe look at this root problem as well? Why does clicking a DataViews row make the checkboxes behave like a single selection mechanism all of a sudden? Either a row click doesn't affect the checkbox state, or it acts identically as a direct checkbox click. No?

@jameskoster
Copy link
Copy Markdown
Contributor

I think the WCAG 2.5.8 Target Size (Minimum) guideline was another motivation for this change. But on closer inspection I wonder if DataViews is covered by the spacing exception:

Undersized targets (those less than 24 by 24 CSS pixels) are positioned so that if a 24 CSS pixel diameter circle is centered on the bounding box of each, the circles do not intersect another target or the circle for another undersized target;

I suppose it depends on whether row-clicks in table layout, or the thumbnail-clicks in grid layout count as 'another target'. My feeling is that they do, and consequently we should aim for a 24px click target (regardless of hover styles). But I recognise my interpretation could be wrong 😅 WDYT?

@mirka
Copy link
Copy Markdown
Member

mirka commented Nov 19, 2025

whether row-clicks in table layout, or the thumbnail-clicks in grid layout count as 'another target'.

I think it definitely does count as another target, because it behaves differently. And what I don't understand is why it has to behave differently. Why would a row click behave like a single select, when checkbox clicks behave like a multiple select? Not only is that unpredictable, that's exactly what's making a tiny misclick be so potentially destructive.

CleanShot.2025-11-20.at.01-37-33.mp4

It isn't even consistent with DataViewsPicker, where a tile click and a checkbox click do the same thing. Am I missing some context?

@fcoveram
Copy link
Copy Markdown
Contributor

For the purpose of this PR, I think increasing the target size sounds the safer path. But I'm curious about the rationale for the behavior in DataViews and DataViewsPicker. I don't know the context of how it began.

@mirka
Copy link
Copy Markdown
Member

mirka commented Nov 20, 2025

Increasing the click target works in favor of this specific quirky DataViews interaction only because clicking outside of the target is the destructive mistake. What if the quirky behavior happened to be reversed: clicking inside of the checkbox is the single selection behavior, and thus destructive. Then increasing the checkbox click target would make this DataViews interaction worse 😅

That's why I don't think increasing the click target universally is a logical fix for these consumer-level UI quirks. It may slightly improve things in some cases, but will slightly worsen things in the opposite cases.

@fcoveram
Copy link
Copy Markdown
Contributor

Oh I see it now. Sorry for not understanding the problem.

Now after interacting with the component in a sample site, I agree there are two pain points:

  1. The same element behaves differently: Clicking a row selects the row, but clicking a checkbox selects the row and also allows selection of more rows.
  2. The behavior is inconsistent in Grid: Clicking on the grid item area doesn't select the item.

With that in mind, I’m drawn to select the row only from the checkbox.

I might be missing some context, but having a single affordance simplifies the heuristic and aligns better with the primary action set in both the entry title and actions. The current use of DataViews in admin mainly serves as a stage to trigger entry-related actions rather than making changes in multiple entries. This interaction change doesn’t eliminate the bulk feature, but it reduces its relevance based on how the component is used today.

What do you think of this?

@jameskoster
Copy link
Copy Markdown
Contributor

With that in mind, I’m drawn to select the row only from the checkbox.

I agree, and this is something @youknowriad has brought up several times recently. The current row-click behavior is just too ambiguous.

DataViewsPicker has a multi-select prop which is a bit confusing because it means we're using checkboxes in a radio context when multi-select is false. I'm not sure why it was built this way 😅

In any case, even if we remove row-click behavior in table layout, we still have an issue in Grid layout where the 16px checkboxes are too small due to the intersection with the thumbnail. Maybe we should open a dedicated issue about that? Increasing isolated checkbox click-target size is only one solution, a simpler approach could be to simply wrap the checkbox in a 24px container...

@fcoveram
Copy link
Copy Markdown
Contributor

DataViewsPicker has a multi-select prop which is a bit confusing because it means we're using checkboxes in a radio context when multi-select is false. I'm not sure why it was built this way 😅

Agree. But in the case, and if we agree with removing the row-clicking behavior, it would be easier to spot the single or multi-selection behavior by hiding or showing the checkbox, respectively.

…we still have an issue in Grid layout where the 16px checkboxes are too small due to the intersection with the thumbnail.

True. If the behavior relies solely on the checkbox, then increasing the target area to meet 24px should not trigger misclicks.

Wraps the checkbox input in an additional span to expand the clickable area, improving accessibility and usability. Adds new styles for the expanded area, including hover effects and proper positioning.
@enejb enejb force-pushed the update/checkbox-control branch from 575ff32 to 001747d Compare November 27, 2025 23:06
@enejb
Copy link
Copy Markdown
Contributor Author

enejb commented Nov 27, 2025

Thanks for all the reviews on this PR.

I removed the animation and the new span element.

I made it work with CSS only changes. The checkboxes did not change in size but they are the surface area of the checkbox is larger.

I added the gray background here to show what it looks like.

The regular PR doesn't add such background.

Mobile:
Screenshot 2025-11-27 at 3 08 20 PM

Desktop:
Screenshot 2025-11-27 at 3 08 16 PM

It also means that the area between the label and the checkbox is clickable before this was not the case.

@github-actions
Copy link
Copy Markdown

Size Change: +90 B (0%)

Total Size: 2.57 MB

Filename Size Change
build/styles/components/style-rtl.css 14.1 kB +44 B (+0.31%)
build/styles/components/style.css 14.1 kB +46 B (+0.33%)
ℹ️ View Unchanged
Filename Size
build/modules/a11y/index.min.js 355 B
build/modules/abilities/index.min.js 43 kB
build/modules/block-editor/utils/fit-text-frontend.min.js 549 B
build/modules/block-library/accordion/view.min.js 779 B
build/modules/block-library/file/view.min.js 346 B
build/modules/block-library/form/view.min.js 528 B
build/modules/block-library/image/view.min.js 1.95 kB
build/modules/block-library/navigation/view.min.js 1.03 kB
build/modules/block-library/query/view.min.js 518 B
build/modules/block-library/search/view.min.js 498 B
build/modules/block-library/tabs/view.min.js 859 B
build/modules/boot/index.min.js 102 kB
build/modules/edit-site-init/index.min.js 1.41 kB
build/modules/interactivity-router/full-page.min.js 451 B
build/modules/interactivity-router/index.min.js 11.5 kB
build/modules/interactivity/index.min.js 14.9 kB
build/modules/latex-to-mathml/index.min.js 56.5 kB
build/modules/latex-to-mathml/loader.min.js 131 B
build/modules/lazy-editor/index.min.js 18.8 kB
build/modules/route/index.min.js 24.5 kB
build/modules/workflow/index.min.js 36.8 kB
build/scripts/a11y/index.min.js 1.06 kB
build/scripts/annotations/index.min.js 2.38 kB
build/scripts/api-fetch/index.min.js 2.83 kB
build/scripts/autop/index.min.js 2.18 kB
build/scripts/blob/index.min.js 631 B
build/scripts/block-directory/index.min.js 8.03 kB
build/scripts/block-editor/index.min.js 322 kB
build/scripts/block-library/index.min.js 276 kB
build/scripts/block-serialization-default-parser/index.min.js 1.16 kB
build/scripts/block-serialization-spec-parser/index.min.js 3.08 kB
build/scripts/blocks/index.min.js 56.3 kB
build/scripts/commands/index.min.js 19.9 kB
build/scripts/components/index.min.js 272 kB
build/scripts/compose/index.min.js 13.9 kB
build/scripts/core-commands/index.min.js 4.13 kB
build/scripts/core-data/index.min.js 86.1 kB
build/scripts/customize-widgets/index.min.js 12.3 kB
build/scripts/data-controls/index.min.js 793 B
build/scripts/data/index.min.js 9.62 kB
build/scripts/date/index.min.js 23.6 kB
build/scripts/deprecated/index.min.js 752 B
build/scripts/dom-ready/index.min.js 476 B
build/scripts/dom/index.min.js 4.91 kB
build/scripts/edit-post/index.min.js 16.3 kB
build/scripts/edit-site/index.min.js 233 kB
build/scripts/edit-widgets/index.min.js 20 kB
build/scripts/editor/index.min.js 284 kB
build/scripts/element/index.min.js 5.19 kB
build/scripts/escape-html/index.min.js 586 B
build/scripts/format-library/index.min.js 10.8 kB
build/scripts/hooks/index.min.js 1.83 kB
build/scripts/html-entities/index.min.js 494 B
build/scripts/i18n/index.min.js 2.46 kB
build/scripts/is-shallow-equal/index.min.js 568 B
build/scripts/keyboard-shortcuts/index.min.js 1.57 kB
build/scripts/keycodes/index.min.js 1.53 kB
build/scripts/list-reusable-blocks/index.min.js 2.44 kB
build/scripts/media-utils/index.min.js 66.4 kB
build/scripts/notices/index.min.js 1.11 kB
build/scripts/nux/index.min.js 1.88 kB
build/scripts/patterns/index.min.js 7.88 kB
build/scripts/plugins/index.min.js 2.14 kB
build/scripts/preferences-persistence/index.min.js 2.15 kB
build/scripts/preferences/index.min.js 3.31 kB
build/scripts/primitives/index.min.js 1.01 kB
build/scripts/priority-queue/index.min.js 1.61 kB
build/scripts/private-apis/index.min.js 1.06 kB
build/scripts/react-i18n/index.min.js 832 B
build/scripts/react-refresh-entry/index.min.js 9.44 kB
build/scripts/react-refresh-runtime/index.min.js 3.59 kB
build/scripts/redux-routine/index.min.js 3.36 kB
build/scripts/reusable-blocks/index.min.js 2.93 kB
build/scripts/rich-text/index.min.js 12.9 kB
build/scripts/router/index.min.js 5.96 kB
build/scripts/server-side-render/index.min.js 1.91 kB
build/scripts/shortcode/index.min.js 1.58 kB
build/scripts/style-engine/index.min.js 2.33 kB
build/scripts/theme/index.min.js 20.8 kB
build/scripts/token-list/index.min.js 739 B
build/scripts/undo-manager/index.min.js 917 B
build/scripts/url/index.min.js 3.98 kB
build/scripts/vendors/react-dom.min.js 43 kB
build/scripts/vendors/react-jsx-runtime.min.js 691 B
build/scripts/vendors/react.min.js 4.27 kB
build/scripts/viewport/index.min.js 1.22 kB
build/scripts/warning/index.min.js 454 B
build/scripts/widgets/index.min.js 7.81 kB
build/scripts/wordcount/index.min.js 1.04 kB
build/styles/block-directory/style-rtl.css 1.05 kB
build/styles/block-directory/style.css 1.05 kB
build/styles/block-editor/content-rtl.css 4.8 kB
build/styles/block-editor/content.css 4.79 kB
build/styles/block-editor/default-editor-styles-rtl.css 224 B
build/styles/block-editor/default-editor-styles.css 224 B
build/styles/block-editor/style-rtl.css 16.4 kB
build/styles/block-editor/style.css 16.4 kB
build/styles/block-library/accordion-heading/style-rtl.css 387 B
build/styles/block-library/accordion-heading/style.css 387 B
build/styles/block-library/accordion-item/style-rtl.css 180 B
build/styles/block-library/accordion-item/style.css 180 B
build/styles/block-library/accordion-panel/style-rtl.css 99 B
build/styles/block-library/accordion-panel/style.css 99 B
build/styles/block-library/accordion/style-rtl.css 62 B
build/styles/block-library/accordion/style.css 62 B
build/styles/block-library/archives/editor-rtl.css 61 B
build/styles/block-library/archives/editor.css 61 B
build/styles/block-library/archives/style-rtl.css 90 B
build/styles/block-library/archives/style.css 90 B
build/styles/block-library/audio/editor-rtl.css 149 B
build/styles/block-library/audio/editor.css 151 B
build/styles/block-library/audio/style-rtl.css 132 B
build/styles/block-library/audio/style.css 132 B
build/styles/block-library/audio/theme-rtl.css 134 B
build/styles/block-library/audio/theme.css 134 B
build/styles/block-library/avatar/editor-rtl.css 115 B
build/styles/block-library/avatar/editor.css 115 B
build/styles/block-library/avatar/style-rtl.css 104 B
build/styles/block-library/avatar/style.css 104 B
build/styles/block-library/breadcrumbs/style-rtl.css 203 B
build/styles/block-library/breadcrumbs/style.css 203 B
build/styles/block-library/button/editor-rtl.css 265 B
build/styles/block-library/button/editor.css 265 B
build/styles/block-library/button/style-rtl.css 554 B
build/styles/block-library/button/style.css 554 B
build/styles/block-library/buttons/editor-rtl.css 291 B
build/styles/block-library/buttons/editor.css 291 B
build/styles/block-library/buttons/style-rtl.css 349 B
build/styles/block-library/buttons/style.css 349 B
build/styles/block-library/calendar/style-rtl.css 239 B
build/styles/block-library/calendar/style.css 239 B
build/styles/block-library/categories/editor-rtl.css 132 B
build/styles/block-library/categories/editor.css 131 B
build/styles/block-library/categories/style-rtl.css 152 B
build/styles/block-library/categories/style.css 152 B
build/styles/block-library/classic-rtl.css 179 B
build/styles/block-library/classic.css 179 B
build/styles/block-library/code/editor-rtl.css 53 B
build/styles/block-library/code/editor.css 53 B
build/styles/block-library/code/style-rtl.css 139 B
build/styles/block-library/code/style.css 139 B
build/styles/block-library/code/theme-rtl.css 122 B
build/styles/block-library/code/theme.css 122 B
build/styles/block-library/columns/editor-rtl.css 108 B
build/styles/block-library/columns/editor.css 108 B
build/styles/block-library/columns/style-rtl.css 421 B
build/styles/block-library/columns/style.css 421 B
build/styles/block-library/comment-author-avatar/editor-rtl.css 124 B
build/styles/block-library/comment-author-avatar/editor.css 124 B
build/styles/block-library/comment-author-name/style-rtl.css 72 B
build/styles/block-library/comment-author-name/style.css 72 B
build/styles/block-library/comment-content/style-rtl.css 120 B
build/styles/block-library/comment-content/style.css 120 B
build/styles/block-library/comment-date/style-rtl.css 65 B
build/styles/block-library/comment-date/style.css 65 B
build/styles/block-library/comment-edit-link/style-rtl.css 70 B
build/styles/block-library/comment-edit-link/style.css 70 B
build/styles/block-library/comment-reply-link/style-rtl.css 71 B
build/styles/block-library/comment-reply-link/style.css 71 B
build/styles/block-library/comment-template/style-rtl.css 191 B
build/styles/block-library/comment-template/style.css 191 B
build/styles/block-library/comments-pagination-numbers/editor-rtl.css 122 B
build/styles/block-library/comments-pagination-numbers/editor.css 121 B
build/styles/block-library/comments-pagination/editor-rtl.css 168 B
build/styles/block-library/comments-pagination/editor.css 168 B
build/styles/block-library/comments-pagination/style-rtl.css 201 B
build/styles/block-library/comments-pagination/style.css 201 B
build/styles/block-library/comments-title/editor-rtl.css 75 B
build/styles/block-library/comments-title/editor.css 75 B
build/styles/block-library/comments/editor-rtl.css 842 B
build/styles/block-library/comments/editor.css 842 B
build/styles/block-library/comments/style-rtl.css 637 B
build/styles/block-library/comments/style.css 637 B
build/styles/block-library/common-rtl.css 1.11 kB
build/styles/block-library/common.css 1.11 kB
build/styles/block-library/cover/editor-rtl.css 631 B
build/styles/block-library/cover/editor.css 631 B
build/styles/block-library/cover/style-rtl.css 1.82 kB
build/styles/block-library/cover/style.css 1.81 kB
build/styles/block-library/details/editor-rtl.css 65 B
build/styles/block-library/details/editor.css 65 B
build/styles/block-library/details/style-rtl.css 86 B
build/styles/block-library/details/style.css 86 B
build/styles/block-library/editor-elements-rtl.css 75 B
build/styles/block-library/editor-elements.css 75 B
build/styles/block-library/editor-rtl.css 11.8 kB
build/styles/block-library/editor.css 11.8 kB
build/styles/block-library/elements-rtl.css 54 B
build/styles/block-library/elements.css 54 B
build/styles/block-library/embed/editor-rtl.css 331 B
build/styles/block-library/embed/editor.css 331 B
build/styles/block-library/embed/style-rtl.css 448 B
build/styles/block-library/embed/style.css 448 B
build/styles/block-library/embed/theme-rtl.css 133 B
build/styles/block-library/embed/theme.css 133 B
build/styles/block-library/file/editor-rtl.css 324 B
build/styles/block-library/file/editor.css 324 B
build/styles/block-library/file/style-rtl.css 278 B
build/styles/block-library/file/style.css 278 B
build/styles/block-library/footnotes/style-rtl.css 198 B
build/styles/block-library/footnotes/style.css 197 B
build/styles/block-library/form-input/editor-rtl.css 229 B
build/styles/block-library/form-input/editor.css 229 B
build/styles/block-library/form-input/style-rtl.css 366 B
build/styles/block-library/form-input/style.css 366 B
build/styles/block-library/form-submission-notification/editor-rtl.css 344 B
build/styles/block-library/form-submission-notification/editor.css 341 B
build/styles/block-library/form-submit-button/style-rtl.css 69 B
build/styles/block-library/form-submit-button/style.css 69 B
build/styles/block-library/freeform/editor-rtl.css 2.59 kB
build/styles/block-library/freeform/editor.css 2.59 kB
build/styles/block-library/gallery/editor-rtl.css 615 B
build/styles/block-library/gallery/editor.css 616 B
build/styles/block-library/gallery/style-rtl.css 1.84 kB
build/styles/block-library/gallery/style.css 1.84 kB
build/styles/block-library/gallery/theme-rtl.css 108 B
build/styles/block-library/gallery/theme.css 108 B
build/styles/block-library/group/editor-rtl.css 335 B
build/styles/block-library/group/editor.css 335 B
build/styles/block-library/group/style-rtl.css 103 B
build/styles/block-library/group/style.css 103 B
build/styles/block-library/group/theme-rtl.css 79 B
build/styles/block-library/group/theme.css 79 B
build/styles/block-library/heading/style-rtl.css 205 B
build/styles/block-library/heading/style.css 205 B
build/styles/block-library/html/editor-rtl.css 419 B
build/styles/block-library/html/editor.css 419 B
build/styles/block-library/image/editor-rtl.css 763 B
build/styles/block-library/image/editor.css 763 B
build/styles/block-library/image/style-rtl.css 1.6 kB
build/styles/block-library/image/style.css 1.59 kB
build/styles/block-library/image/theme-rtl.css 137 B
build/styles/block-library/image/theme.css 137 B
build/styles/block-library/latest-comments/style-rtl.css 355 B
build/styles/block-library/latest-comments/style.css 354 B
build/styles/block-library/latest-posts/editor-rtl.css 139 B
build/styles/block-library/latest-posts/editor.css 138 B
build/styles/block-library/latest-posts/style-rtl.css 520 B
build/styles/block-library/latest-posts/style.css 520 B
build/styles/block-library/list/style-rtl.css 107 B
build/styles/block-library/list/style.css 107 B
build/styles/block-library/loginout/style-rtl.css 61 B
build/styles/block-library/loginout/style.css 61 B
build/styles/block-library/math/editor-rtl.css 105 B
build/styles/block-library/math/editor.css 105 B
build/styles/block-library/math/style-rtl.css 61 B
build/styles/block-library/math/style.css 61 B
build/styles/block-library/media-text/editor-rtl.css 321 B
build/styles/block-library/media-text/editor.css 320 B
build/styles/block-library/media-text/style-rtl.css 543 B
build/styles/block-library/media-text/style.css 542 B
build/styles/block-library/more/editor-rtl.css 393 B
build/styles/block-library/more/editor.css 393 B
build/styles/block-library/navigation-link/editor-rtl.css 645 B
build/styles/block-library/navigation-link/editor.css 647 B
build/styles/block-library/navigation-link/style-rtl.css 190 B
build/styles/block-library/navigation-link/style.css 188 B
build/styles/block-library/navigation-submenu/editor-rtl.css 295 B
build/styles/block-library/navigation-submenu/editor.css 294 B
build/styles/block-library/navigation/editor-rtl.css 2.24 kB
build/styles/block-library/navigation/editor.css 2.24 kB
build/styles/block-library/navigation/style-rtl.css 2.27 kB
build/styles/block-library/navigation/style.css 2.25 kB
build/styles/block-library/nextpage/editor-rtl.css 392 B
build/styles/block-library/nextpage/editor.css 392 B
build/styles/block-library/page-list/editor-rtl.css 356 B
build/styles/block-library/page-list/editor.css 356 B
build/styles/block-library/page-list/style-rtl.css 192 B
build/styles/block-library/page-list/style.css 192 B
build/styles/block-library/paragraph/editor-rtl.css 251 B
build/styles/block-library/paragraph/editor.css 251 B
build/styles/block-library/paragraph/style-rtl.css 341 B
build/styles/block-library/paragraph/style.css 340 B
build/styles/block-library/post-author-biography/style-rtl.css 74 B
build/styles/block-library/post-author-biography/style.css 74 B
build/styles/block-library/post-author-name/style-rtl.css 69 B
build/styles/block-library/post-author-name/style.css 69 B
build/styles/block-library/post-author/style-rtl.css 188 B
build/styles/block-library/post-author/style.css 189 B
build/styles/block-library/post-comments-count/style-rtl.css 72 B
build/styles/block-library/post-comments-count/style.css 72 B
build/styles/block-library/post-comments-form/editor-rtl.css 96 B
build/styles/block-library/post-comments-form/editor.css 96 B
build/styles/block-library/post-comments-form/style-rtl.css 525 B
build/styles/block-library/post-comments-form/style.css 525 B
build/styles/block-library/post-comments-link/style-rtl.css 71 B
build/styles/block-library/post-comments-link/style.css 71 B
build/styles/block-library/post-content/style-rtl.css 61 B
build/styles/block-library/post-content/style.css 61 B
build/styles/block-library/post-date/style-rtl.css 62 B
build/styles/block-library/post-date/style.css 62 B
build/styles/block-library/post-excerpt/editor-rtl.css 71 B
build/styles/block-library/post-excerpt/editor.css 71 B
build/styles/block-library/post-excerpt/style-rtl.css 155 B
build/styles/block-library/post-excerpt/style.css 155 B
build/styles/block-library/post-featured-image/editor-rtl.css 719 B
build/styles/block-library/post-featured-image/editor.css 717 B
build/styles/block-library/post-featured-image/style-rtl.css 347 B
build/styles/block-library/post-featured-image/style.css 347 B
build/styles/block-library/post-navigation-link/style-rtl.css 215 B
build/styles/block-library/post-navigation-link/style.css 214 B
build/styles/block-library/post-template/style-rtl.css 414 B
build/styles/block-library/post-template/style.css 414 B
build/styles/block-library/post-terms/style-rtl.css 96 B
build/styles/block-library/post-terms/style.css 96 B
build/styles/block-library/post-time-to-read/style-rtl.css 70 B
build/styles/block-library/post-time-to-read/style.css 70 B
build/styles/block-library/post-title/style-rtl.css 162 B
build/styles/block-library/post-title/style.css 162 B
build/styles/block-library/preformatted/style-rtl.css 125 B
build/styles/block-library/preformatted/style.css 125 B
build/styles/block-library/pullquote/editor-rtl.css 133 B
build/styles/block-library/pullquote/editor.css 133 B
build/styles/block-library/pullquote/style-rtl.css 365 B
build/styles/block-library/pullquote/style.css 365 B
build/styles/block-library/pullquote/theme-rtl.css 176 B
build/styles/block-library/pullquote/theme.css 176 B
build/styles/block-library/query-pagination-numbers/editor-rtl.css 121 B
build/styles/block-library/query-pagination-numbers/editor.css 118 B
build/styles/block-library/query-pagination/editor-rtl.css 154 B
build/styles/block-library/query-pagination/editor.css 154 B
build/styles/block-library/query-pagination/style-rtl.css 237 B
build/styles/block-library/query-pagination/style.css 237 B
build/styles/block-library/query-title/style-rtl.css 64 B
build/styles/block-library/query-title/style.css 64 B
build/styles/block-library/query-total/style-rtl.css 64 B
build/styles/block-library/query-total/style.css 64 B
build/styles/block-library/query/editor-rtl.css 438 B
build/styles/block-library/query/editor.css 438 B
build/styles/block-library/quote/style-rtl.css 238 B
build/styles/block-library/quote/style.css 238 B
build/styles/block-library/quote/theme-rtl.css 233 B
build/styles/block-library/quote/theme.css 236 B
build/styles/block-library/read-more/style-rtl.css 131 B
build/styles/block-library/read-more/style.css 131 B
build/styles/block-library/reset-rtl.css 472 B
build/styles/block-library/reset.css 472 B
build/styles/block-library/rss/editor-rtl.css 126 B
build/styles/block-library/rss/editor.css 126 B
build/styles/block-library/rss/style-rtl.css 284 B
build/styles/block-library/rss/style.css 283 B
build/styles/block-library/search/editor-rtl.css 199 B
build/styles/block-library/search/editor.css 199 B
build/styles/block-library/search/style-rtl.css 665 B
build/styles/block-library/search/style.css 666 B
build/styles/block-library/search/theme-rtl.css 113 B
build/styles/block-library/search/theme.css 113 B
build/styles/block-library/separator/editor-rtl.css 100 B
build/styles/block-library/separator/editor.css 100 B
build/styles/block-library/separator/style-rtl.css 248 B
build/styles/block-library/separator/style.css 248 B
build/styles/block-library/separator/theme-rtl.css 195 B
build/styles/block-library/separator/theme.css 195 B
build/styles/block-library/shortcode/editor-rtl.css 286 B
build/styles/block-library/shortcode/editor.css 286 B
build/styles/block-library/site-logo/editor-rtl.css 773 B
build/styles/block-library/site-logo/editor.css 770 B
build/styles/block-library/site-logo/style-rtl.css 218 B
build/styles/block-library/site-logo/style.css 218 B
build/styles/block-library/site-tagline/editor-rtl.css 87 B
build/styles/block-library/site-tagline/editor.css 87 B
build/styles/block-library/site-tagline/style-rtl.css 65 B
build/styles/block-library/site-tagline/style.css 65 B
build/styles/block-library/site-title/editor-rtl.css 85 B
build/styles/block-library/site-title/editor.css 85 B
build/styles/block-library/site-title/style-rtl.css 143 B
build/styles/block-library/site-title/style.css 143 B
build/styles/block-library/social-link/editor-rtl.css 314 B
build/styles/block-library/social-link/editor.css 314 B
build/styles/block-library/social-links/editor-rtl.css 339 B
build/styles/block-library/social-links/editor.css 338 B
build/styles/block-library/social-links/style-rtl.css 1.51 kB
build/styles/block-library/social-links/style.css 1.51 kB
build/styles/block-library/spacer/editor-rtl.css 346 B
build/styles/block-library/spacer/editor.css 346 B
build/styles/block-library/spacer/style-rtl.css 48 B
build/styles/block-library/spacer/style.css 48 B
build/styles/block-library/style-rtl.css 16.6 kB
build/styles/block-library/style.css 16.5 kB
build/styles/block-library/tab/style-rtl.css 202 B
build/styles/block-library/tab/style.css 202 B
build/styles/block-library/table-of-contents/style-rtl.css 83 B
build/styles/block-library/table-of-contents/style.css 83 B
build/styles/block-library/table/editor-rtl.css 394 B
build/styles/block-library/table/editor.css 394 B
build/styles/block-library/table/style-rtl.css 641 B
build/styles/block-library/table/style.css 640 B
build/styles/block-library/table/theme-rtl.css 152 B
build/styles/block-library/table/theme.css 152 B
build/styles/block-library/tabs/editor-rtl.css 236 B
build/styles/block-library/tabs/editor.css 236 B
build/styles/block-library/tabs/style-rtl.css 983 B
build/styles/block-library/tabs/style.css 983 B
build/styles/block-library/tag-cloud/editor-rtl.css 92 B
build/styles/block-library/tag-cloud/editor.css 92 B
build/styles/block-library/tag-cloud/style-rtl.css 248 B
build/styles/block-library/tag-cloud/style.css 248 B
build/styles/block-library/template-part/editor-rtl.css 368 B
build/styles/block-library/template-part/editor.css 368 B
build/styles/block-library/template-part/theme-rtl.css 113 B
build/styles/block-library/template-part/theme.css 113 B
build/styles/block-library/term-count/style-rtl.css 63 B
build/styles/block-library/term-count/style.css 63 B
build/styles/block-library/term-description/style-rtl.css 126 B
build/styles/block-library/term-description/style.css 126 B
build/styles/block-library/term-name/style-rtl.css 62 B
build/styles/block-library/term-name/style.css 62 B
build/styles/block-library/term-template/editor-rtl.css 225 B
build/styles/block-library/term-template/editor.css 225 B
build/styles/block-library/term-template/style-rtl.css 114 B
build/styles/block-library/term-template/style.css 114 B
build/styles/block-library/text-columns/editor-rtl.css 95 B
build/styles/block-library/text-columns/editor.css 95 B
build/styles/block-library/text-columns/style-rtl.css 165 B
build/styles/block-library/text-columns/style.css 165 B
build/styles/block-library/theme-rtl.css 715 B
build/styles/block-library/theme.css 719 B
build/styles/block-library/verse/style-rtl.css 98 B
build/styles/block-library/verse/style.css 98 B
build/styles/block-library/video/editor-rtl.css 415 B
build/styles/block-library/video/editor.css 416 B
build/styles/block-library/video/style-rtl.css 202 B
build/styles/block-library/video/style.css 202 B
build/styles/block-library/video/theme-rtl.css 134 B
build/styles/block-library/video/theme.css 134 B
build/styles/commands/style-rtl.css 1.72 kB
build/styles/commands/style.css 1.72 kB
build/styles/customize-widgets/style-rtl.css 1.44 kB
build/styles/customize-widgets/style.css 1.44 kB
build/styles/edit-post/classic-rtl.css 426 B
build/styles/edit-post/classic.css 427 B
build/styles/edit-post/style-rtl.css 3.42 kB
build/styles/edit-post/style.css 3.42 kB
build/styles/edit-site/style-rtl.css 16.1 kB
build/styles/edit-site/style.css 16.2 kB
build/styles/edit-widgets/style-rtl.css 4.67 kB
build/styles/edit-widgets/style.css 4.67 kB
build/styles/editor/style-rtl.css 18.8 kB
build/styles/editor/style.css 18.8 kB
build/styles/format-library/style-rtl.css 326 B
build/styles/format-library/style.css 326 B
build/styles/list-reusable-blocks/style-rtl.css 1.02 kB
build/styles/list-reusable-blocks/style.css 1.02 kB
build/styles/nux/style-rtl.css 622 B
build/styles/nux/style.css 618 B
build/styles/patterns/style-rtl.css 611 B
build/styles/patterns/style.css 611 B
build/styles/preferences/style-rtl.css 415 B
build/styles/preferences/style.css 415 B
build/styles/reusable-blocks/style-rtl.css 275 B
build/styles/reusable-blocks/style.css 275 B
build/styles/widgets/style-rtl.css 1.17 kB
build/styles/widgets/style.css 1.18 kB

compressed-size-action

@jasmussen
Copy link
Copy Markdown
Contributor

I added the gray background here to show what it looks like.
The regular PR doesn't add such background.

Nice, wfm.

@jameskoster
Copy link
Copy Markdown
Contributor

To recap, the increased target size is required when the checkbox overlaps another interactive element which the latest changes accomplish. But it leads to a visual quirk... In the screenshot below a click would toggle the checkbox, despite the cursor being visually positioned on the thumbnail.

Screenshot 2025-12-01 at 16 48 30

This is potentially a bit misleading, and why I think some kind of hover style is quite important; it indicates interactivity prior to any clicks.

@enejb
Copy link
Copy Markdown
Contributor Author

enejb commented Dec 1, 2025

So how should we proceed here? Add a hover background as designed in #73312 (comment) ?

@jasmussen
Copy link
Copy Markdown
Contributor

I don't mind that, and I think the cases where this would cause confusion are few. It feels relatively normal with other UIs, here Gmail.

gmail

It's also the case for our icon buttons.

But your point is valid! My (soft) objection to the hover style is situational, it's something we should do at a later time, in a more systematic way, not ad-hoc.

@fcoveram
Copy link
Copy Markdown
Contributor

fcoveram commented Dec 1, 2025

+1 to Joen's approach. I don't think those cases are too common, although Gmail in light mode does show the a hover style.

CleanShot 2025-12-01 at 16 37 44

@jameskoster
Copy link
Copy Markdown
Contributor

It still seems a bit strange (imo) to solve one issue by introducing another, especially as hover styles are easy to change. But I agree it's not a huge problem, so I'm happy to merge revisit if that's the preferred approach.

@enejb
Copy link
Copy Markdown
Contributor Author

enejb commented Dec 4, 2025

How do we want to proceed with this? Is the design review done?

Do we need anther code review? cc @mirka and @aduth

@jasmussen
Copy link
Copy Markdown
Contributor

If Jay chimes in with a strong opinion, I will defer to him as the decider.

If not, let's move forward without the hover background for now, and come back to hover backgrounds at a later time.

@mirka
Copy link
Copy Markdown
Member

mirka commented Dec 5, 2025

I do still think we're trying to fix a problem at the wrong layer.

checkbox list

For example, let's take this standard list of checkbox items. If we extend the click target of each checkbox 8px in each direction, those click targets will actually be overlapping each other. That doesn't make sense.

If we increase the click target like this, we'll also need to increase the clearance between each checkbox to at least 20px, maybe more. Is it really worth this density trade-off, given that this doesn't even really "fix" the original problem with the DataViews?

Indeed, MUI is showing a very large clearance between checkbox items, and a zone of ambiguity in the middle 😄

CleanShot.2025-12-05.at.23-48-21.mp4

@enejb
Copy link
Copy Markdown
Contributor Author

enejb commented Dec 5, 2025

Thanks for the feedback @mirka !

I do agree with you. I wish the table view behaved more constantly with the other dataviews. For example the way that the grid view works or even when you add specific click areas to the table view you end up in inconsitancies.

I think, only clicking the checkbox should "select" the particular row. Clicking the row should trigger a different behaviour.
In other words it should work also more like the current (wp-admin) tables that exists in the classic post list view.

I also think to make the checkbox more click in the previous version of the table (in wp-admin) is that the whole checkbox cell is a click area.

See this video.

Screen.Recording.2025-12-05.at.9.06.17.AM.mov

Would it make sense to go and implement this to be work like this in the new Table Dataview?
Can we make this behaviour the default or will we need to make it opt in?

@jameskoster
Copy link
Copy Markdown
Contributor

I've heard it mentioned in various channels that the row-click behavior in DataViews table layout is too ambiguous, so I think we should try removing that 👍

But the issue remains in grid layout. If we prefer to fix this at the DataViews layer I think that's fine. I suppose we'd just need to wrap the checkbox in a 24x24px container to satisfy the a11y guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] UI Components Impacts or related to the UI component system [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants