-
-
Notifications
You must be signed in to change notification settings - Fork 245
Improve meaningful sequence in report/around page #5354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
7219efc
to
eb3bd29
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5354 +/- ##
==========================================
- Coverage 82.30% 82.29% -0.01%
==========================================
Files 428 428
Lines 34057 34075 +18
Branches 5511 5511
==========================================
+ Hits 28029 28041 +12
- Misses 4397 4403 +6
Partials 1631 1631 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
eb3bd29
to
a22092c
Compare
A couple of notes from the previous PR:
I solved this issue in this PR. See here: ![]() |
85e4c8d
to
6360815
Compare
@dracos I made the changes requested in #5208 so I split the commits into 4:
In the review I included the latest comments you left in #5208 |
@dracos I think this is still with you for review. Could you please review this before you go on leave so we can try and get this wrapped up in the coming sprint. |
This change will make it easier to control the icon size by passing it as an argument. It will also minimise issues with passing the contrast test, where currently the sprite has a fixed colour that doesn't necessarily pass the contrast test, and it's quite hard to read against light backgrounds. Now, the icons use currentColor, so it inherits the value of the parent.
- Added aria-expanded. - Increase visibility of the drawer on mobile by moving it to the top of the screen. - Added close button to drawer. - If drawer is opened using keyboard then the focus jumps to the first element inside the drawer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for tidying and making all those changes :) I think the display_tools_mobile template can include the other SVG templates you changed the main template to use, and I had one question about when the buttons are hidden on mobile.
The browser tests fail a lot, I assume due to where things have moved to so that will need looking at, I can take a look at some of them if time later today.
|
||
#key-tools { | ||
html.js & { | ||
display: none; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are the desktop buttons only hidden if JS is enabled? It means both sets of buttons are shown if JS isn't working - is there an issue with always hiding them, does something go wrong?
<li><form method="post" action="/report/[% problem.id %]/delete" id="remove-from-site-form"> | ||
<input type="hidden" name="token" value="[% csrf_token %]"> | ||
<button type="submit" id="key-tool-report-abuse" class="has-inline-svg has-inline-svg--column-wrap" data-confirm="[% loc('Are you sure?') %]" name="remove_from_site"> | ||
<svg role="presentation" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="1.5em" height="1.5em" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path fill="currentColor" d="M12.866 3l9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0zM11 16v2h2v-2h-2zm0-7v5h2V9h-2z"/></svg> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This template could use the same icons/ templates I think? The contents of the SVGs look the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Then, if all that's different then is the order of the text and the SVG, can flex order fix that? Then they could share more of the same template for the list items themselves.)
6360815
to
47e8f90
Compare
@@ -0,0 +1,43 @@ | |||
<div class="shadow-wrap"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, one more thing - this file has some IDs in that are duplicating the ones in display_tools.html. I see you fixed the ones that you were then using in the JS, but the others will need fixing too - e.g. key-tool-report-abuse (not used at all, can be removed), key-tool-problems-nearby (does have some uses), and remove-from-site-form (not needed at all?)
This allows it more easily to appear in a better place on mobile from desktop.
This commit should minimise the confusion for assistive device users. Currently, the way components are presented and the focus order is not linear; after they have travelled through the map, they are presented with the 'Can't use the map?' link and then go directly to the `#key-tools` component sitting at the bottom of the page, skipping the filters and report list. To respect the page sequence, the user should go directly to the report filter and then to the report list. The downside of this approach is that users who want to use the #key-tools would have to jump through a whole list of reports before being able to get to the #key-tools. The solution in this commit is to add a link right after the 'Can't use the map?' that gives the user some context about the mismatch between the reading sequence and also the opportunity to skip the #key-tools in case they just want to jump the next element which would be the report filters.
47e8f90
to
21312a1
Compare
I've hopefully patched the commit so that the Cypress tests are passing again (they were getting confused now there were two key tools blocks in the source). So just the small issues above :) |
Fixes: https://github.com/mysociety/societyworks/issues/4560
Replaces: #5208
Unlike the previous PR#5208 I thought that a better approach to include the icons would be to use HTML templates instead of copy and pasting the SVG. See commit here
Preview
Screen.Recording.2025-02-06.at.07.01.49.mov
Preview Mobile
Screen.Recording.2025-02-06.at.07.03.19.mov
Pending from PR #5208
templates/web/base/report/display_tools_mobile.html
is quite