Coming from #1912604: Convert theme_views_mini_pager to twig
Mini pager has no visually-hidden 'Pages' markup like the full pager does.
Comment | File | Size | Author |
---|---|---|---|
#9 | 2058279-mini_pager_a11y-9.patch | 404 bytes | mondrake |
Coming from #1912604: Convert theme_views_mini_pager to twig
Mini pager has no visually-hidden 'Pages' markup like the full pager does.
Comment | File | Size | Author |
---|---|---|---|
#9 | 2058279-mini_pager_a11y-9.patch | 404 bytes | mondrake |
Comments
Comment #1
dawehnerAll you need is to copy the default pager twig output to the mini pager one.
Comment #2
mondraketagging
Comment #3
mondraketagging
Comment #4
Liam MorlandRemove obsolete tag.
Comment #5
star-szrI think we should make this a sub-issue of #1804614: [meta] Consolidate theme functions and properly use theme suggestions in core, and just make the mini pager a theme suggestion of the default pager.
Like
'#theme' => 'pager__mini_pager'
or similar. If the markup is identical no point in having two.So re-structuring this issue to do that.
Comment #6
star-szrHowever… we can't have a separate preprocess function for the mini pager until some work on #2004872: [meta] Theme system architecture changes is resolved (new theme suggestions hook and hook_theme_prepare() phase).
I'd prefer to postpone this issue rather than have two identical Twig templates but anyone is welcome to disagree :)
Comment #7
mondrakeIMHO, we should keep decoupled the accessibility discussion from the consolidation opportunity, as per the comment #57 in #1912604: Convert theme_views_mini_pager to twig.
I am not objecting to your points @Cottser, just believe it should be a separate issue.
I am not reverting anything here as I see this issue has been referenced in a meta.
Comment #8
star-szrSure, no problem. Reverting the changes here and created #2076301: Remove views-mini-pager.html.twig, use a pager theme suggestion instead.
Comment #8.0
star-szrAdd meta issue to summary
Comment #9
mondrakeSo, here's a patch.
This makes core/modules/views/templates/views-mini-pager.html.twig identical to core/modules/system/templates/pager.html.twig , in line with the issue summary and comment #1.
I am not sure this is OK from a pure accessibility POV though, hence review is needed.
A 'full' pager is rendered as:
a 'mini' pager (called from within a view with view's default link labels) as:
Comment #10
mondrake... and status change ...
Comment #11
dawehnerAdding tag, but I guess this is just fine.
Comment #12
mgiffordI've just looked at the code, but seems it's just adding to a list:
<h2 class="visually-hidden">Pages</h2>
So that looks good to me to provide additional context for Assistive Tech users.
Comment #13
dawehnerIt is the same code as the normal pager so +1
Comment #14
alexpottCommitted 7d07ce0 and pushed to 8.x. Thanks!
Comment #15.0
(not verified) CreditAttribution: commentedRevert change to summary