aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2015-09-18 11:31:23 +0100
committerMatthew Somerville <matthew@mysociety.org>2015-09-18 11:31:23 +0100
commit87c98049ced69902427c752666245bf652727a37 (patch)
tree1d377ae17bfc5ab602c8963a857f742b7208a66d /web
parentae05cc5d953f0de784ade62579f49840178d37c1 (diff)
Improve accessibility of map pages.
Hide the map with aria-hidden, as all report links are duplicated in the main content. Fix skip map link on mobile (it was disappearing). Place delegate handler on body to prevent e.g. VoiceOver announcing everything underneath .container as clickable. Remove header report button rather than hide off-screen, as is a duplicate link to the previous.
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js7
-rw-r--r--web/cobrands/sass/_layout.scss9
2 files changed, 10 insertions, 6 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index 5a4e7ab4d..122488646 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -178,8 +178,7 @@ $(function(){
});
//move 'skip this step' link on mobile
- $('.mobile #skip-this-step').hide();
- $('.mobile #skip-this-step a').addClass('chevron').wrap('<li>').appendTo('#key-tools');
+ $('.mobile #skip-this-step').addClass('chevron').wrap('<li>').parent().appendTo('#key-tools');
/*
* Tabs
@@ -369,12 +368,12 @@ $.fn.drawer = function(id, ajax) {
// Go directly to RSS feed if RSS button clicked on alert page
// (due to not wanting around form to submit, though good thing anyway)
- $('.container').on('click', '#alert_rss_button', function(e){
+ $('body').on('click', '#alert_rss_button', function(e){
e.preventDefault();
var feed = $('input[name=feed][type=radio]:checked').nextAll('a').attr('href');
window.location.href = feed;
});
- $('.container').on('click', '#alert_email_button', function(e){
+ $('body').on('click', '#alert_email_button', function(e){
e.preventDefault();
var form = $('<form/>').attr({ method:'post', action:"/alert/subscribe" });
form.append($('<input name="alert" value="Subscribe me to an email alert" type="hidden" />'));
diff --git a/web/cobrands/sass/_layout.scss b/web/cobrands/sass/_layout.scss
index 26460c580..cc4cfadf2 100644
--- a/web/cobrands/sass/_layout.scss
+++ b/web/cobrands/sass/_layout.scss
@@ -118,11 +118,16 @@ h1 {
top:-3.25em;
}
}
-#nav-link,
-#report-cta {
+
+#nav-link {
#{$right}: auto;
#{$left}: -999999px;
}
+
+#report-cta {
+ display: none;
+}
+
#main-nav{
margin: 0 auto;
padding: 0em;