Problem/Motivation
The pager by default uses an h4, this creates the `Heading levels should only increase by one` error in many use cases.
Steps to reproduce
Create a view with a pager that has no other content on the page.
Run axe devtools
Proposed resolution
Add ability to set the heading level per view pager.
Options should be h1 - h6
Sidenote: the initial approach discussed on this issue of moving the heading text into an aria-label attribute on the parent tag, and thereby removing the Heading element altogether will indeed help pass many accessibility tests, but is detrimental to actual users. See comment #30 from @andrewmacpherson for full details.
Remaining tasks
User interface changes

API changes
N/A
Data model changes
Add pagination_heading_level to views pager schema
Add pagination_heading_level variable to views mini pager and full pager
Release notes snippet
-
Add new pager heading level setting for views pagers.
-
Add new pager heading level variable for full pagers and views mini pagers.
-
Update all core themes except stable9 to utilize the new variable.
| Comment | File | Size | Author |
|---|---|---|---|
| #91 | PagerHeadingLevelViews.png | 88.02 KB | nicxvan |
Issue fork drupal-3333401
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3333401-configurable-level
changes, plain diff MR !5282
- 3333401-pager-h4-causes
changes, plain diff MR !3242
Comments
Comment #2
nicxvan commentedThe way I generally address this based on feedback from @chrisfromredfin is to remove the h4 and add the pagination to the aria label.
So this:
Becomes this:
If that's correct I am happy to make a merge request updating the core themes.
Comment #3
nicxvan commentedComment #4
bnjmnmaria-labelledbyis used for referencing an element that has the desired label text. In this case, we want to get rid of that<h4>, so the solution in #2 would be referencing a nonexistent element.Change that to
aria-label, don't bother usingheading_idat all (you're not using heading anymore), and you should be fine.. If the label is for assisitive tech only, it doesn't need to be contained in another element, you can define it directly witharia-labelBe sure to make the change to all views pager templates except those in stable9. Even though it is a visually hidden element, changing it is technically altering markup that would break the BC policy, though it could be argued (ideally in a followup so you can get the benefits ASAP) that it's an accessibility bugfix and should be applied to Stable9.
Comment #6
nicxvan commentedAdding patch so testing will work due to current replication issues:
Comment #7
nicxvan commentedComment #8
bnjmnmTo assistive tech, this solution works identically so it's not at all disruptive. It accomplishes the same identification, but without the header-order-contaminating
<h4>The
aria-labelledbywas referencing a visually hidden element, so switching to the simpleraria-labeltakes care of this without any tradeoffs. If the<h4>was visible, it would potentially be worth another approach, but in this case it's not needed.This is not changed in Stable9, so any debates regarding regression vs. bugfix can happen in the Stable9 scoped followup issue #3333418: Fix pager h4 for accessibility on Stable9. The easy wins can happen here, and that issue can deal with the remaining ones that might require discussion.
This arguably makes the
heading_idproperty unnecessary in pager templates, so I opened a followup to address that, which can be tackled once this issue lands: #3333449: [PP-1] Consider deprecating heading_id property from pagination templatesComment #10
nicxvan commentedNot sure why the retest failed, they were unrelated datetime failures. I retested and they all passed so I'm moving back to RTBC.
Comment #15
lauriiiCommitted 01de0a8 and pushed to 10.1.x. Cherry-picked to 10.0.x and 9.5.x since this is a non-disruptive bug fix. Thanks!
Comment #17
xjmI think this broke 9.5.x: https://www.drupal.org/pift-ci-job/2576989
Reverted and queuing the patch against that branch.
Comment #18
xjmComment #19
nicxvan commentedI think this is due to how classy was removed from 10, there was a related issue: https://www.drupal.org/project/drupal/issues/3232222 that addressed the content hash, I'm not sure how to provide a MR that fixes tests in 9.5 that would have been removed in 10.
I closed the related issue yesterday when this was merged.
Let me know how I should proceed and I'm happy to address it.
Comment #20
nicxvan commentedI think I may have gotten it:
Comment #21
nicxvan commentedI used the wrong hashing function - here is the correct one.
Comment #22
nicxvan commentedFor some reason the page.css file is now triggering a failure even though nothing changed, I regenerated the hash locally.
Comment #23
nicxvan commentedNot sure why that was failed this time.
Comment #24
nicxvan commentedSorry for the back and forth on the patches, this is the first time I've generated content hashes and one of them was different than the test was generating, I think due to my local php version, this should be right.
Comment #25
nicxvan commentedComment #26
nicxvan commentedI missed updating two themes.
Comment #27
nicxvan commentedI had inverted the pager hash
Comment #28
nicxvan commentedOk I got it, the confusion on my end was I didn't realize more than one theme was failing so I flipped back and forth a couple of times.
Some of the folks on https://www.drupal.org/project/drupal/issues/3232222 should get credit cause I pulled from that issue to get this right.
Comment #29
johnpicozziLooks good to me. Tested on Simlytest.me and does what is expected. Moving to RTBC!
Comment #30
andrewmacpherson commentedI Saw this on the Drupal 9.5.3 release notes yesterday, including the reverting commit.
I think the proposal here is rather brutal. It doesn't take account of well-attested user behaviours. I don't think we should remove the heading.
@nicxvan - Thanks for reporting the issue. I appreciate the work you've done to maintain the patch here.
I'd like to take issue with the appraisal so far. Comment #8 by @bnjmnm moved this to RTBC:
Emphasis mine. This remark is concerned with the assistive technology software, rather than the software's human users. The proposal may not be disruptive to software, but it is likely to be disruptive for users.
Previously, the pagination could be found by screen reader users in a number of ways:
After implementing the proposal here, two of these methods no longer work:
aria-labelattribute.Will this be disruptive for actual users? Let's look at some user data.
The WebAIM Screen Reader User Survey #9 asked respondents:
The same question was asked in earlier WebAIM surveys:
But the proposal here puts the kibosh on the two most popular methods, and doubles down on the least popular method!
Concerning the report from the aXe tests:
It's also worth noting that the skipped heading level IS NOT a failure of any WCAG success criteria. For a detailed explanation, see David Swallow's article: Heading off confusion: When do headings fail WCAG?
So, what's the impact (for users) of skipping a heading level? It's actually not as bad as the aXe rule title implies.
Screen readers are quite forgiving of missing heading levels. The missing heading level isn't a complete disaster.
Screen reader users can interact with headings in various ways:
I'd like to stress that accessibility is about helping actual users, not satisfying opinionated best-practice rules in automated tests. It certainly isn't about keeping developer's dashboards green. Has any screen reader user asked for the heading to be removed?
Should we continue to provide a heading for the pagination? Yes. It facilitates the two most popular methods of finding information, as reported by the WebAim screen reader user survey.
Should we continue to use a landmark region? Yes. A moderate number of landmarks are very useful for finding the major sections of the page, and/or small-but-important tools on the page. Pagination for the main content is a good candidate for a landmark region.
Whilst landmark regions aren't the first tool that all users reach for, a simple landmark structure is a great accompaniment to a detailed heading outline. The belt-and-braces approach of using landmarks and headings offers choice for users.
For these reasons, I'd say no to the current proposal to remove the heading.
Comment #31
andrewmacpherson commentedAlternative proposal: keep the heading. Can we improve the heading level?
We could deal with the missing level by promoting it to h3, and aXe would stop complaining.
The devil is in the details though...
Headings assume ownership over ALL of the content which follows, until another heading of the same level (or higher) is encountered.
For example, consider the
admin/contentpage, with the default configuration from Standard profile.Currently it looks like the pagination (h4) is a sub-heading under the breadcrumb navigation (the preceding h2). This is clearly nonsense, and promoting the pagination heading to h3 wouldn't improve that at all. It would still be a misleading heading structure, even though we'd eliminated the missing level which aXe complained about.
We could promote the pagination to a h2 level. Then it would be a subheading of the main page heading (h1), and a sibling of the breadcrumb and primary tabs. Much better.
Yet, a h2 assumes that the pagination relates to the main content of the page. For a views block in a sidebar region, the h2 would be too important; the views block would have it's own h2. Or, the views block might have no heading at all. Either way, giving the pagination a h2 in a views block would produce a misleading outline, suggesting it related to the main content.
Managing heading levels with a template-driven publishing system is a pain-in-the-architecture. There is no single correct level for every use of the template.
A more ambitious approach would be to compute heading levels, for the context of the assembled page. I'm not aware of prior PHP work which does this, but there's an interesting article from Heydon Pickering about how to do it in a React Javascript application: Managing Heading Levels In Design Systems. I expect there are still devils lurking in the details there too. Heydon's use of
aria-levelcould complicate our existing CSS, but a server-side PHP approach might avoid usingaria-levelif we computed the heading levels late in the page render process.Comment #34
lauriiiThank you @andrewmacpherson for your comprehensive and insightful response. Your thoughts and experiences are greatly appreciated, and your point about the potential regressions with some assistive technology users seems to warrant a revert.
I completely agree with you that real users should always be our top priority, and their needs and experiences should always be at the forefront of our considerations. Automated tools and tests are certainly helpful, but they are ultimately secondary to the needs of the people who are using the system.
Comment #35
itmaybejj commentedIf we were to revisit this and bring back the heading, my instinct would be to go via JS post-load -- querySelectorAll for H1, H2, H3, H4 and their aria equivalents. Then iterate the array and each time you hit a pagination heading, modify the pagination header's level to be one less than the previous level in the array.
That's what I do in Editoria11y -- I walk the tree comparing levels and flag things as needed.
And then...add a field to Views for "Pagination heading level." Let people manually pick a level if they know more than the machine, and have the default be auto, which pulls the JS library. To avoid breaking CSS changes to existing sites, the upgrade script could set existing views to "4" and only new views/installs would use the "auto..."
Comment #36
andrewmacpherson commentedRe. #34 - Aha... thanks lauriii. I saw in the D9.5.3 release notes it was reverted, but I didn't realize it was still there in the D10 branches.
Re. #35 - We still have the heading, barring a brief blip in D10.0.3
That JS logic could be useful to study. I think server-side logic to write the correct level in HTML would be preferable to JS though.
Comment #37
nicxvan commentedThank you @andrewmacpherson for the detailed write up, I'll have to read through those survey's more closely.
I completely agree with you and @laurii that real users are the priority.
I think it is helpful prevent false negatives on almost every page of a real site if possible because it removes white noise when addressing accessibility issues. So if there is a way to address the heading issue without affecting usability then we should do that.
After reading your write up, there doesn't seem to really be a way to remove the heading without significantly affecting usability negatively which means we need to see if there is a way to set it in a way that responds to content as mentioned.
I do have a couple of questions / comments about the alternative solutions mentioned:
I'm not sure how this could be addressed at the template level since it's so contextual to what content the page and the pager could be split out from the content of the view. It could also be affected by rewriting fields.
That points closer to using javascript, but I'm not sure the javascript solution is much better as it's just the inverse of the false negative from the automated test. Also I'd be wary of adding js just to prevent an accessibility flag in axe tools.
It sounds like the correct solution is to do nothing in core and if we need to change heading levels on an individual case we just use separate templates for pagers as needed.
If there is something to be done still I'd be happy to take a crack at it.
Comment #38
andrewmacpherson commentedI don't really mind the white noise, or the Drupal core issues that result from it. It's nice to know people run automated tests.
aXe has some ways to turn off certain tests; the browser plugin has a button to disable the "best practice" category, and if you run it from the CLI you can exclude specific tests I think. What you can't do is flag a specific test result as a false flag.
Mind you, there are some accessibility testing dashboards out there which let you mark individual reports as resolved/wontfix, and they don't bug you about it later. SiteImprove was one, and I think perhaps Deque or TPGi offerings might have this too. They're commercial, and SiteImprove had too many zeros on the end of the price for my liking, but this is possible.
The thing is, the aXe report here ISN'T a false report. It really would be better if we didn't skip a heading level. It's just that the impact isn't actually very severe in practice, and the proposed cure was worse than the disease.
Yeah, I think that would be folly, too. It would also make us subject to ridicule and suspicion in the wider accessibility community.
Aside: there have been some disturbing reports alleging that an accessibility overlay company interfered with the WAVE accessibility checker, and WAVE's developers noticed this. Some nice bedtime reading at #accessiBe Spoofs Automated Checkers.
There is absolutely no way we can allow JS in Drupal core just to silence a test suite.
Comment #39
nicxvan commentedAh, great points!
After re-reading #35, maybe the solution is a new option to set the heading in the pager options in views. I missed that suggestion, so it would default to h4, but you could set the heading level like you do in fields.
Comment #40
nicxvan commentedI'm going to make an attempt at making the pager level configurable at the individual view level.
I'll make sure this tests both 9.5 and 10 so we don't have the same test failures.
Comment #41
nicxvan commentedComment #42
nicxvan commentedI created a new branch since the previous one was merged and doesn't really match this approach at all.
I took a first pass at adding the option to the pager.
I added a new settings value for views so that we can restrict the tags to headings.
This only adds and saves the value in the pager form, it does not do anything yet to the templates, I had some questions.
I'd welcome feedback on naming / process so far.
Things I am not sure the best way to approach:
How do I get that pager option in the views.theme.inc when the pager is instantiated?
I assume I have to override it in theme.inc as well.
Where would the update hook to create that config go? views.install?
This only attempts to provide the fix in 10.x since I will have to regenerate the classy hashes again and those don't exist on this branch.
Comment #43
nicxvan commentedComment #44
itmaybejj commentedSimple, elegant; I like the approach.
Dodging the update script question...
Comment #45
xurizaemonThis text made me realise that the functionality presumes the site admin can predict the context that the view will be rendered in. In some cases (eg a
<drupal-view>embedded in content) this won't be the case. I'm not pitching the dynamic approach here, just that assigning a heading level at view config makes assumptions about the content structure the view will be used in later which can't be relied on. For the case of an embed, there are at least two cases:Since views are configuration and commonly re-used, I expect there are other situations where the same might apply.
Instead of fixing to headings here, should we permit views to use headings or
<nav>, allowing site admins to determine an appropriate method? That seems like it would fit within the changes to permit tag selection, if it's an acceptable change for accessibility requirements.For the proposed description there's also the case where views have section headings disabled. If we stick with headings, I propose a less specific text for that description, eg "Choose a heading level appropriate to the context of the view placement". (It's not great, but it doesn't specify too much?)
Comment #46
xurizaemon@nicxvan, I don't see the new branch mentioned in #42 here - did that get missed? The only MR branch showing on the issue (for me) is the previously merged one.
Taking the opportunity in this comment to accept your offer in #3333401-28: Pager h4 causes accessibility flag on many pages for credit from #3232222: Pager template h4 can be out of document hierarchy order previously. (Hmm ... that checkbox isn't "sticking" for me when I select it.)
Comment #47
nicxvan commented@itmaybejj good points on terminology, I'll update that.
@xurizaemon The branch is at the top, I didn't create an MR yet since I need advice. But here is the branch: https://git.drupalcode.org/issue/drupal-3333401/-/tree/3333401-configura... and the Diff https://git.drupalcode.org/issue/drupal-3333401/-/compare/10.1.x...33334...
It's right below where it calls the fork.
Comment #48
nicxvan commentedI updated the pull request with most of the feedback.
I think updating the actual tag is better than just a aria heading.
Comment #50
mgiffordTagging for WCAG SC 2.4.6 https://www.w3.org/WAI/WCAG21/Understanding/headings-and-labels.html
Comment #51
tsquared212 commentedThe attached patch expands on the work done in the issue fork - injecting the 'pagination_heading_level' into both full and mini pagers, as well as updating all core theme pager templates. For the life of me, I could not access 'pager_rewrite_elements' from the view config, so instead I added a method to filter out the heading elements from 'field_rewrite_elements'.
Comment #52
tsquared212 commentedComment #53
tsquared212 commentedBlank line was missing necessary whitespace.
Comment #54
tsquared212 commentedI think I may have a crlf issue
Comment #55
tsquared212 commentedComment #56
tsquared212 commentedComment #57
tsquared212 commentedComment #58
tsquared212 commentedComment #59
tsquared212 commentedComment #60
tsquared212 commentedComment #61
tsquared212 commentedComment #62
tsquared212 commentedSubmitted patch works, but fails a test -- Drupal\Tests\datetime\Functional\Views\FilterDateTest, due to a schema error despite numerous attempts to patch (views.pager.schema.yml).
Comment #63
smustgrave commentedMoving to NW for test failure
Also imagine this will need test coverage.
Also tagging for CR for changes to twig files.
Comment #64
tsquared212 commentedRe-rolled patch to add guards for non-view pagers.
Comment #65
nicxvan commentedI'm going to port your changes back to the branch and take a crack at the tests. I think we can hide the 9.5 changes since 9 is end of life.
Comment #66
nicxvan commented@tsquared212 I moved your changes to the branch again since that's where initial testing was going. I made two changes.
1. I added the pager rewrite schema back since it gives more flexibility in the future rather than using the field rewrite.
2. I changed the default to h4 since that is what it was before. Let me know if there was a specific reason for that change.
For 2 I think it makes sense to change if others do too, I think the first point is important to keep though.
Comment #68
nicxvan commentedI'm getting the same error in the gitlab ci. I tried adding the new option to the pager to see if that was it, but it did not fix it.
Comment #69
nicxvan commentedFailure copied here for convenience:
This is the test that is failing: core/modules/datetime/tests/src/Functional/Views/FilterDateTest.php
Any guidance would be appreciated, I'm not sure why that would not be returning 2 rows
Comment #70
nicxvan commentedIt looks like the pages are not rendering, if you want to see them you can go here https://git.drupalcode.org/issue/drupal-3333401/-/jobs/290017/artifacts/... and look for the ones with the id 93301068.
https://issue.pages.drupalcode.org/-/drupal-3333401/-/jobs/290017/artifa...
Comment #71
nicxvan commentedI found the error: https://issue.pages.drupalcode.org/-/drupal-3333401/-/jobs/290017/artifa...
Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for views.view.test_filter_datetime with the following errors: views.view.test_filter_datetime:display.default.display_options.pager.options.pagination_heading_level missing schema, 0 [display.default.display_options.pager.options.pagination_heading_level] 'pagination_heading_level' is not a supported key. in Drupal\Core\Config\Development\ConfigSchemaChecker->onConfigSave() (line 94 of core/lib/Drupal/Core/Config/Development/ConfigSchemaChecker.php).
call_user_func(Array, Object, 'config.save', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'config.save') (Line: 229)
Drupal\Core\Config\Config->save() (Line: 278)
Drupal\Core\Config\Entity\ConfigEntityStorage->doSave('test_filter_datetime', Object) (Line: 486)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 257)
Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object) (Line: 352)
Drupal\Core\Entity\EntityBase->save() (Line: 609)
Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 1001)
Drupal\views_ui\ViewUI->save() (Line: 345)
Drupal\views_ui\ViewEditForm->save(Array, Object)
call_user_func_array(Array, Array) (Line: 129)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 67)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 597)
Drupal\Core\Form\FormBuilder->processForm('view_edit_form', Array, Object) (Line: 325)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 48)
Drupal\Core\Entity\EntityFormBuilder->getForm(Object, 'edit', Array) (Line: 230)
Drupal\views_ui\Controller\ViewsUIController->edit(Object, 'default')
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 37)
Drupal\Core\Test\StackMiddleware\TestWaitTerminateMiddleware->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Comment #72
nicxvan commented@tsquared212 I figured out the testing issue, this is ready for review. Please use the merge request for review.
Comment #73
nicxvan commentedComment #74
smustgrave commentedWith the schema changes will require a post_update hook in addition to a change record.
Comment #75
nicxvan commentedComment #76
nicxvan commentedI removed the heading options from views.settings per conversation in slack with @lendude.
I am also adding a first pass at updating the pager config.
There is no test yet and the update is not working. This seems to be due to the pager returning multiple handlers and not being plural.
One schema question:
Does views_pager_sql need the pagination_heading_level setting?
Should I split processDisplayHandlerSingular or find a way to get processDisplayHandlers to work with pagers. (I would lean towards calling it process pager handlers)
Comment #77
nicxvan commentedThis still has several items todo
1. Write a test that confirms changing the header style works
2. Investigate broken tests
3. Confirm the update test is working as expected
4. Typehint
5. Determine if the post update should exclude `some` pager plugin
Comment #78
nicxvan commentedNow that the options are moved to the pager options the default config tests are failing in the kernel. I updated the core views to include the correct config but they are still failing.
Here is the failure:
1) Drupal\KernelTests\Config\DefaultConfigTest::testModuleConfig with data
set "user" ('user')
Exception: views.view.user_admin_people:
\Drupal\Component\Diff\Engine\DiffOpAdd::__set_state(array(
'type' => 'add',
'orig' => false,
'closing' =>
array (
0 => ' pagination_heading_level: h4',
),
))
Comment #79
nicxvan commentedIt looks like it's getting added in core/lib/Drupal/Component/Diff/Engine/DiffOpAdd.php I haven't tracked down why though.
Comment #80
nicxvan commentedOk I figured out that there were two things that were triggering the kernel failures.
The new schema shouldn't be last and there were a few items missing the config.
I've updated the MR with Kernel fixes.
Comment #81
nicxvan commentedI've added a test for setting the value and for checking claro, olivero and starterkit for the full pager.
Comment #82
nicxvan commentedComment #83
nicxvan commentedComment #84
nicxvan commentedI'm working on the change record.
Comment #85
nicxvan commentedHere is the first draft of the change record for review: https://www.drupal.org/node/3402642
I also rebased and fixed the multilingual tests again.
There was a js functional failure, but I think that was random / unrelated so I'm running it again.
Comment #86
nicxvan commentedAll tests are passing
Comment #87
smustgrave commentedGreat work on the update hook!
There's a change to a fixture that I don't believe needs to be there.
Also since this is introducing a new UI element could a screenshot be added the User interface section.
Again great work!
Comment #88
nicxvan commentedThanks! I learned so much digging into this!
I assume you mean the UI section of the change record, I've added the screenshot. If you mean somewhere else let me know.
That fixture update is intentional and necessary, I left a comment on the MR and resolved, but I'll comment here too. I needed to add the new schema setting to the views in that fixture cause the test loads them and looks for changes to config globally and only allows the system mail change.
If any other changes happen then the test fails. The update hook for this change adds the pagination heading value so those are detected as changes and fail the test.
I extracted the fixture, added the schema to the views and re compressed it. I had to pull from the latest on 11.x since it was updated last week.
Comment #89
nicxvan commentedAfter taking another look there was a missing test for stark. The changes I made would work for the full pager, but I created a new assertion for stark for the mini pager.
I ran the tests locally and they passed so this should too, but I'll watch the pipeline and move to needs work if they don't pass.
Comment #90
nicxvan commentedTests pass, there was a random failure on the js side again but rerunning it succeeded.
Comment #91
nicxvan commentedComment #92
nicxvan commentedWorking on this
Comment #93
nicxvan commentedI've added more complete testing for pager types in the post update test.
Comment #94
nicxvan commentedComment #95
smustgrave commentedBefore applying the MR I did an export of the config to compare the views. Obviously didn't have the header config changes.
Applied the MR and the update hooks ran without issue
Did another config export and all my views have the header settings now.
Using the content view for manual testing I see the default H4
Changed it in the config to H2 and that worked like a charm.
Running test-only feature shows a few failures so think test coverage is there https://git.drupalcode.org/issue/drupal-3333401/-/jobs/376849
Believe this one is good!
Great work!
Comment #96
larowlanAdded issue credits
@andrewmacpherson 💙💙💙 thank you so much for your thorough explanation, including data to support it. This community never ceases to amaze me.
Left some comments on the MR, great work here folks!
Comment #97
nicxvan commentedI addressed all of larowlan's feedback and tests are all passing so putting back into needs review.
Comment #98
smustgrave commentedAppears feedback from @larowlan has been addressed.
Comment #99
larowlanIssue credits
Rebased this, will commit if passes
Thanks for all the changes @nicxvan
Comment #101
larowlanCommitted to 11.x after rebase
I added an extra unit-test case for an invalid value and waited for a green run
Published the change record
Because this adds an update path, it can only be added in a minor so isn't eligible for backport.
Thanks again all.
Comment #103
nicxvan commentedComment #104
nicxvan commentedComment #105
nicxvan commentedComment #106
jwilson3Came here looking for explanation of why an additional option was added to Drupal, instead of the initial approach discussed on this issue of moving the heading text into an
aria-labelattribute on the parent tag, and thereby removing the Heading element altogether.Had to dig for the answer buried in comment #30 and learned something in the process.
I've updated the issue summary with a sidenote about this point to help others not have to dig for the gold!
Thank you @andrewmacpherson; always enlightening.
Comment #108
nicxvan commentedTagging for release note inclusion.
Comment #109
nicxvan commentedComment #110
_kash_ commented.