Skip to content
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

Dialog fix #104

Merged
merged 5 commits into from
Jul 8, 2024
Merged

Dialog fix #104

merged 5 commits into from
Jul 8, 2024

Conversation

tinykite
Copy link
Contributor

@tinykite tinykite commented Jul 3, 2024

What this does

This primary makes an accessibility fix to a dialog that is triggered by clicking the "Search" option in the main navigation for the CAP static project, with some small additional improvements.

Screenshots

The dialog now includes a "close" button to dismiss it and return to the previously focused element. The button's close icon itself is 24x24 but the total target size for the button is substantially larger — to meet guidelines outlined by WCAG 2.5.5 AAA for the minimum target size for pointer inputs.
image

Additionally, the dialog no longer hides content that overflows its container. Instead, a browser will now natively provide a scroll to surface additional content:
image

Comment on lines -251 to -256
<a
class="nav__link"
@click="${this._openSearchInterstitial}"
href="https://www.courtlistener.com/opinion/"
>Search</a
>
Copy link
Contributor Author

@tinykite tinykite Jul 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this link element was likely another remnant of a past development effort — potentially before the dialog existed. I swapped it out for a button, which typically toggles a dialog.

}

render() {
return html`
<div>
Copy link
Contributor Author

@tinykite tinykite Jul 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was probably a remnant from past development efforts. It's not functionally needed, so I removed it.

@tinykite tinykite marked this pull request as ready for review July 3, 2024 16:40
@tinykite tinykite requested a review from a team as a code owner July 3, 2024 16:40
@tinykite tinykite requested review from teovin and removed request for a team July 3, 2024 16:40
Copy link
Contributor

@rebeccacremona rebeccacremona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking care of this, and for cleaning up those subtle bugs along the way!

LGTM!

@tinykite tinykite merged commit 0a59492 into harvard-lil:main Jul 8, 2024
1 check passed
@tinykite tinykite deleted the dialog-fix branch July 8, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants