-
Notifications
You must be signed in to change notification settings - Fork 693
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
refactors Journalist Interface for semantic HTML5/ARIA markup #6165
Conversation
@SaptakS, while this pull request is officially still a draft, I wanted to request your accessibility review of the markup refactoring I've proposed here. Per discussion with the SecureDrop team, once I've revised this draft based on your feedback, I'll make the CSS changes necessary for pixel-perfect consistency with Note that one test ( |
Confirmed that |
eb9f35d
to
afe5d90
Compare
The flake, most demonstrably seen in https://app.circleci.com/pipelines/github/freedomofpress/securedrop/3208/workflows/dd8b4348-b646-4cbb-8ac1-af76e1173290/jobs/58091/tests#failed-test-0, looks like:
This behavior is not reproducible in manual testing (in Chrome, Firefox, or Tor Browser) and in 2054603 persists even if |
afe5d90
to
697d59e
Compare
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 looks awesome! Left few comments that I think should be addressed. Some of the comments are applicable in multiple places and templates (e.g., missing id attribute and aria-label on buttons comments ). The comments are related to only HTML semantics, since I think the styling is still under progress and there are some "Fix me" sections.
<time class="date" title="{{ source.last_updated|rel_datetime_format }}" datetime="{{ source.last_updated|html_datetime_format }}">{{ source.last_updated|rel_datetime_format(relative=True) }}</time> | ||
<div class="designation"> | ||
<tr class="source {% if source.num_unread != 0 %}unread{% else %}read{% endif %}" data-source-designation="{{ source.journalist_designation|lower }}"> | ||
<td aria-label="{{ source.last_updated|rel_datetime_format(relative=True) }}"><time class="date" title="{{ source.last_updated|rel_datetime_format }}" datetime="{{ source.last_updated|html_datetime_format }}">{{ source.last_updated|rel_datetime_format(relative=True) }}</time></td> |
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.
I don't see the need for an aria-label here, since the inner html already contains the time element with the same text content.
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.
I agree in theory! In practice, at least my screen-reader (VoiceOver on macOS) reads the datetime
attribute instead of the inner HTML, unless overridden with this aria-label
.
fixup: f3593e0 thread: #6165 (comment) thread: #6165 (comment)
697d59e
to
cbc3b8a
Compare
Thanks, @SaptakS! I've been able to resolve all but one of your suggestions right away. I appreciate your careful eye on these changes! On now to CSS polishing. |
ade1f90
to
177a271
Compare
c63f45e
to
9a68390
Compare
c75e03d
to
b60a0f8
Compare
Codecov Report
@@ Coverage Diff @@
## develop #6165 +/- ##
===========================================
- Coverage 85.13% 85.12% -0.01%
===========================================
Files 59 59
Lines 4090 4088 -2
Branches 487 487
===========================================
- Hits 3482 3480 -2
Misses 491 491
Partials 117 117
Continue to review full report at Codecov.
|
b60a0f8
to
9195677
Compare
This reverts commit 6d4602d.
…ling NB. The refactoring of the UL#cols listing into the TABLE#collections table is not pixel-perfect, because the latter uses strict columnar spacing. This is up for debate.
NB. As in "index.html" and "_source_row.html", the conversion of UL.submissions into TABLE.submissions is not pixel-perfect. In this case, I've not even attempted to make it so: this layout is to my eye more idiomatic visually as well as semantically. This too is up for debate.
Of note, we rescope some rules in "_button.sass" to accommodate the special case of BUTTON[data-tooltip]. These enhancements layer less elegantly than I'd like, in both markup and stylesheet, which will be the subject of a forthcoming ticket.
Along the way, makes spacing more consistent with "/account/account" and "/admin/edit" too. However, the visible H1 is a deliberate departure from the current styling.
…*_two_factor.html" styling
…nt,admin}_edit_hotp_secret.html" styling
…eview feedback) thread: #6165 (comment)
48f36d9
to
262ce5a
Compare
Thanks, @legoktm! I've rebased out the |
Thanks all, taking a final spin through now. |
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.
Status
Description of Changes
Closes #5987 by:
securedrop/journalist_templates/*.html
for semantic markup;Testing
Click through the Journalist Interface and inspect in terms of:
Steps (2)–(3) should be performed in Tor Browser at both "standard" and "safest" security levels.
Finally:
Deployment
No special considerations.
Checklist
After approval and before merge
securedrop/journalist_templates/*.html
(especially fix-ups) to one commit per passIf you made changes to the server application code:
make lint
) and tests (make test
) pass in the development container