Bugzilla – Attachment 108457 Details for
Bug 26039
Accessibility: Shelf browser is not announced upon loading
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26039: Focus and Scroll to ShelfBrowser on load
Bug-26039-Focus-and-Scroll-to-ShelfBrowser-on-load.patch (text/plain), 4.48 KB, created by
ByWater Sandboxes
on 2020-08-18 11:01:47 UTC
(
hide
)
Description:
Bug 26039: Focus and Scroll to ShelfBrowser on load
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2020-08-18 11:01:47 UTC
Size:
4.48 KB
patch
obsolete
>From e6075cffe543b12b346457be9252eca5703746f2 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 13 Aug 2020 13:17:59 +0100 >Subject: [PATCH] Bug 26039: Focus and Scroll to ShelfBrowser on load > >When the shelf browser link is clicked we perform a full page reload >which results in a reset in the context. We should immediately focus the >shelf browser and scroll to that region to highlight the change of >content. > >Test plan >1/ Enable shelf browser >2/ Search for an item in the open and navigate to the detail page >3/ Click the 'Browse shelf' link >4/ Note that upon page reload the screen scrolls to the 'Browsing...' >location of the screen. >5/ Note that the 'Browsing...' title is 'focused' >6/ Signoff. > >Signed-off-by: Stina Hallin <stina.hallin@ub.lu.se> >--- > koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc | 4 ++-- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 13 +++++++++++-- > 2 files changed, 13 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc >index f7e35adc58..253fe20893 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc >@@ -1,13 +1,13 @@ > [% BLOCK shelfbrowser %] > [% IF OpenOPACShelfBrowser %] > <div id="shelfbrowser"> >- <h5 style="text-align: center;"> >+ <h5 style="text-align: center;" tabindex="-1"> > [%- IF ( starting_homebranch ) %]Browsing [% starting_homebranch | html %] shelves[% END -%] > [%- IF ( starting_homebranch && starting_location ) %], [% END %] > [%- IF ( starting_location ) %]Shelving location: [%- starting_location | html -%][% END -%] > [%- IF ( starting_homebranch && starting_ccode ) %], [% END %] > [%- IF ( starting_ccode ) %]Collection: [%- starting_ccode | html -%][% END -%] >- <a style="font-size: 75%;" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber | html %]" class="close_shelf" >Close shelf browser</a> >+ <a style="font-size: 75%;" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber | html %]" class="close_shelf" >Close shelf browser<span class="hidden"> (Hides shelfbrowers)</span></a> > </h5> > > <table class="table"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index cc32512efd..7bb897954d 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1249,9 +1249,9 @@ > [% ITEM_RESULT.itemcallnumber | html %] > [% IF ( OPACShelfBrowser ) %] > [% IF ( ITEM_RESULT.itemnumber == starting_itemnumber ) %] >- (<a class="close_shelf" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ITEM_RESULT.biblionumber | html %]&shelfbrowse_itemnumber=[% ITEM_RESULT.itemnumber | html %]#[% tab | html %]">Browse shelf</a>) >+ (<a class="close_shelf" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ITEM_RESULT.biblionumber | html %]&shelfbrowse_itemnumber=[% ITEM_RESULT.itemnumber | html %]#[% tab | html %]">Browse shelf<span class="hidden"> (Opens below)</span></a>) > [% ELSE %] >- (<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ITEM_RESULT.biblionumber | uri %]&shelfbrowse_itemnumber=[% ITEM_RESULT.itemnumber | uri %]#[% tab | uri %]">Browse shelf</a>) >+ (<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ITEM_RESULT.biblionumber | uri %]&shelfbrowse_itemnumber=[% ITEM_RESULT.itemnumber | uri %]#[% tab | uri %]">Browse shelf<span class="hidden"> (Opens below)</span></a>) > [% END %] > [% END %] > [% END %] >@@ -1583,6 +1583,15 @@ > [% END %] > > [% IF ( OPACShelfBrowser ) %] >+ // Focus on shelf browser if present >+ var shelfbrowser = $("#shelfbrowser"); >+ if (shelfbrowser.length > 0) { >+ $('html,body').animate({ >+ scrollTop: shelfbrowser.first().offset().top >+ }, >+ 'slow'); >+ shelfbrowser.first().find(':focusable').eq(0).focus(); >+ } > > (function prepareShelfBrowser(){ > >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26039
:
108174
|
108178
|
108457
|
108562
|
108573