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

Alt text and marking elements decorative #14819

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

s596757
Copy link

@s596757 s596757 commented Jul 12, 2023

As per comments on PR (#9682), removed redundant title attribute in code and left aria-hidden.

Changed the getTitleSvg function to include DOMUtils as per recommendation

tested via speak aloud and narrator. Previously was reading out icons descriptions but is no longer doing so in either.
Created new PR as unable to push into previous PR due to base branch changes.

Reference PR: #9682

@jupyterlab-probot
Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

@github-actions github-actions bot removed tag:CSS For general CSS related issues and pecadilloes Design System CSS labels Jul 21, 2023
Copy link
Contributor

@isabela-pf isabela-pf 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 so much for working on this and being persistent even when it takes time for me to get reviewing. Overall, I agree with the idea that the launcher icons (next to the text title of a launcher section) should be decorative and note read from a user experience perspective.

I'm not clear what

Changed the getTitleSvg function to include DOMUtils as per recommendation
impacts on the user side. Based on comments on past PRs it looks like this was a request to remove unused code? Since it was requested I'm open to it, but I don't really know how to usefully review it. @gabalafou was this your request in the past?

For clarity, I don't have the resources to review this with assistive tech myself at the moment, so know I am reviewing this solely on reading the Files Changed. I also don't have quite enough knowledge of ARIA in this use case and how it interacts with JupyterLab. I'm really reviewing this based on the proposed user interaction of the PR.

I do have a few questions I'd like answered before I approve it:

  • Are there any negative consequences of hiding what is also part h2?
  • Is the intent for the TODO to stay in the JupyterLab codebase, or is that a marker for the author before this PR is to be merged? I am seeing precedent for it elsewhere in the codebase, so if it's intentional I won't block on it.

@gabalafou
Copy link
Contributor

For reference, this PR supersedes #14400

Copy link
Contributor

@gabalafou gabalafou left a comment

Choose a reason for hiding this comment

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

I believe we said in the call yesterday that we should pause review on this PR. However, I decided to look at it anyway and leave some remarks.

/>
<h2 className="jp-Launcher-sectionTitle">{cat}</h2>
<h2 className="jp-Launcher-sectionTitle" title={cat + ' Title'}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Please explain the rationale for this change. What was the user experience before this line change, what is the user experience after this line change, and why is it better?

I'm sorry but I can't figure out from reading neither the PR description nor the associated issue #9682. For example, the issue says nothing about using the title attribute on elements, as far as I can tell. It only mentions using the <title> tag in <svg> elements.

Comment on lines +833 to +835
// make the title the aria label0

/// TODO set better unique id for title
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// make the title the aria label0
/// TODO set better unique id for title

Comment on lines +838 to +840
if (!titleNodes[0].id) {
titleNodes[0].id = performance.now().toString();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (!titleNodes[0].id) {
titleNodes[0].id = performance.now().toString();
}

if (titleNodes.length) {
titleNodes[0].textContent = title;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this line be removed?

Copy link
Contributor

@gabalafou gabalafou left a comment

Choose a reason for hiding this comment

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

Oops meant to click "request changes"

@isabela-pf
Copy link
Contributor

I believe we said in the call yesterday that we should pause review on this PR.

@gabalafou then that was my misunderstanding from the accessibility meeting. Sorry about that! I'll check in again at the upcoming meeting and won't mess with this PR until then.

@krassowski krassowski marked this pull request as draft December 20, 2023 18:00
@krassowski
Copy link
Member

@s596757 are you still interested in finishing this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants