Needs work
Project:
Drupal core
Version:
main
Component:
views.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 Sep 2025 at 21:42 UTC
Updated:
27 Jul 2026 at 12:33 UTC
Jump to comment: Most recent, Most recent file



Comments
Comment #2
kentr commentedComment #3
kentr commentedFirst draft in issue branch. Still needs tests.
Comment #5
kentr commentedComment #6
acbramley commentedNightwatch tests are extremely inefficient and are likely being phased out eventually (see #3467492: [policy, no patch] Replace Nightwatch with Playwright).
The test here can be rewritten as a functional test that just checks for the label and uses a test view that's already defined in yaml.
Comment #7
kentr commentedChecking just for the
labelelement is brittle because there are multiple ways to nameelementsform controls. It's more robust and more closely resembles user interaction to use a tool that gets the computed name. AFAICT, PHPUnit can't do this out of the box even with the selenium webdriver, but Axe and Nightwatch can.This Nightwatch test also uses a full Axe check that covers the whole page and can be expanded to cover more exposed filter cases, in line with #2857808: Automate Accessibility Checks for Core. Views doesn't have good coverage.
#3338664: Migrate Nightwatch Axe tests to PHPUnit was chosen to replace the Nightwatch + Axe tests, but it's stalled.
It may start moving soon, but if it doesn't:
Even if standard Nightwatch tests move to Playwright, the accessibility tests will have no replacement until until #3338664: Migrate Nightwatch Axe tests to PHPUnit lands. I vote for having better accessibility test coverage in the interim and converting tests to PHPUnit then.
I tried to use one of the existing test views but didn't find a means outside of PHPUnit. Using one of the existing standard views (like Frontpage or Content) seems brittle because they may be removed from the testing profile. This is how I arrived at creating a simple test view in the test.
Comment #8
cboyden commentedThis is not just an issue with numeric filters, it is a general issue with exposed filters where the operator is also exposed. For example, if you follow the steps in the issue summary and also add exposed Content type and Tags filters with exposed operators, you will see the same problem.
Comment #9
cboyden commentedUpdated issue summary with steps to reproduce and screenshots showing three types of exposed filters/operators with errors.
Comment #10
cboyden commentedComment #11
kentr commented@cboyden It looks like the errors for the Content type and tag / vocabulary filters are fixed by #933004: Test that all form elements have a #title for accessibility. I see the errors in
11.xbut not with the MR from that issue.Based on the scoping docs, the precedent set by that issue, and a (very old) comment by @sun regarding the earlier effort to fix missing titles, I'm going to roll these
#titlefixes into #933004: Test that all form elements have a #title for accessibility.That issue adds a check for empty
#titleproperties, which should catch these cases for now and defer the question of better accessible name tests and / or Axe coverage.It did catch the original numeric filter problem in this issue, and that particular test passes locally when I apply the changes from this MR to
NumericFilter.php.Closing as duplicate of #933004: Test that all form elements have a #title for accessibility.
Comment #13
kentr commentedSplitting out changes from #933004: Test that all form elements have a #title for accessibility.
Comment #14
kentr commentedI updated steps to reproduce. Tags and content types were removed from the standard profile.
I'll update the MR to fix the issues that @cboyden reported and look for other cases included in #933004: Test that all form elements have a #title for accessibility.
Comment #15
kentr commentedI added fixes for the cases that @cboyden reported in #8.
I didn't find other cases, but I think it's a general fix that will cover other cases except where the specific filter plugin overrides it in
::valueForm(). I didn't find any overrides like this.I removed the Nightwatch test and am hoping we can skip the addition of tests for now since the goal of #933004: Test that all form elements have a #title for accessibility is to add a single test for all cases.
Comment #16
smustgrave commentedDon’t think we can skip tests for a bug. So think we need to add some here or postpone on the parent issue.
Comment #17
kentr commentedIIRC we've skipped them for special cases in the past. I remember the context being something like "this issue has been reviewed & manually tested aplenty, so we (core committers) are OK with deferring the automated tests".
I'll see if I can dig up the issue.
Comment #18
kentr commented@lauriii in #3541910-38: Elements in closed sidebar are focusable:
Maybe someone in the C-Suite (framework manager / core committer?) can weigh in on this case.
Comment #19
kentr commentedStill, there is a followup to add test coverage: #3570453: Test coverage for closed sidebar focus in Navigation.
It was @catch who said (before @lauriii's decision)
I'm hoping for the "test coverage in a followup" here.
Comment #20
smustgrave commentedStill think as a bug we should add coverage here. Especially since it could just be a few assertions on existing tests. Else think this should be closed and folded into the parent where I guess test coverage will be also.