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

Misc ARIA improvements #2766

Merged
merged 1 commit into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/components/BottomRightPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export let BottomRightPanel = ({
? null
: html`<button
class="helpbox-close"
title="Close panel"
onClick=${() => {
set_open_tab(null)
}}
Expand Down
8 changes: 4 additions & 4 deletions frontend/components/ExportBanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const ExportBanner = ({ notebook_id, print_title, open, onClose, notebook
<div class="export_title">export</div>
<!-- no "download" attribute here: we want the jl contents to be shown in a new tab -->
<a href=${notebookfile_url} target="_blank" class="export_card" onClick=${(e) => exportNotebook(e, 0)}>
<header><${Triangle} fill="#a270ba" /> Notebook file</header>
<header role="none"><${Triangle} fill="#a270ba" /> Notebook file</header>
<section>Download a copy of the <b>.jl</b> script.</section>
</a>
<a
Expand All @@ -115,11 +115,11 @@ export const ExportBanner = ({ notebook_id, print_title, open, onClose, notebook
exportNotebook(e, 1)
}}
>
<header><${Square} fill="#E86F51" /> Static HTML</header>
<header role="none"><${Square} fill="#E86F51" /> Static HTML</header>
<section>An <b>.html</b> file for your web page, or to share online.</section>
</a>
<a href="#" class="export_card" onClick=${() => window.print()}>
<header><${Square} fill="#619b3d" /> PDF</header>
<header role="none"><${Square} fill="#619b3d" /> PDF</header>
<section>A static <b>.pdf</b> file for print or email.</section>
</a>
${html`
Expand All @@ -134,7 +134,7 @@ export const ExportBanner = ({ notebook_id, print_title, open, onClose, notebook
}}
class="export_card"
>
<header><${Circle} fill="#E86F51" /> Record <em>(preview)</em></header>
<header role="none"><${Circle} fill="#E86F51" /> Record <em>(preview)</em></header>
<section>Capture the entire notebook, and any changes you make.</section>
</a>
`}
Expand Down
3 changes: 2 additions & 1 deletion frontend/components/FrontmatterInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export const FrontMatterInput = ({ filename, remote_frontmatter, set_remote_fron
<button
class="deletefield"
title="Delete field"
aria-label="Delete field"
onClick=${() => {
// TODO
set_frontmatter(
Expand Down Expand Up @@ -116,7 +117,7 @@ export const FrontMatterInput = ({ filename, remote_frontmatter, set_remote_fron
If you are publishing this notebook on the web, you can set the parameters below to provide HTML metadata. This is useful for search engines and
social media.
</p>
<div class="card-preview">
<div class="card-preview" aria-hidden="true">
<h2>Preview</h2>
<${FeaturedCard}
entry=${
Expand Down
5 changes: 4 additions & 1 deletion frontend/components/ProcessTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ const StatusItem = ({ status_tree, path, my_clock_is_ahead_by, nbpkg, backend_la
}
}

const can_open = Object.values(mystatus.subtasks).length > 0

return path.length === 0
? inner
: html`<pl-status
Expand All @@ -199,8 +201,9 @@ const StatusItem = ({ status_tree, path, my_clock_is_ahead_by, nbpkg, backend_la
finished,
busy,
is_open,
can_open: Object.values(mystatus.subtasks).length > 0,
can_open,
})}
aria-expanded=${can_open ? is_open : undefined}
>
<div
onClick=${(e) => {
Expand Down
Loading