Content-Length: 362386 | pFad | https://github.com/bbcmicrobit/PythonEditor/pull/313

A0 a11y: make link into button by microbit-mark · Pull Request #313 · bbcmicrobit/PythonEditor · GitHub
Skip to content

a11y: make link into button #313

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

Merged

Conversation

microbit-mark
Copy link
Contributor

@microbit-mark microbit-mark commented Dec 19, 2019

fixes https://github.com/microbit-foundation/platform-software-issue-tracker/issues/596
Buttons are accessible by default as opposed to links
Before
Screenshot 2019-12-19 at 10 49 23
After
Screenshot 2019-12-19 at 10 50 08

@@ -957,6 +957,17 @@ input:checked + .menu-switch-slider:before {
float: right;
}

#file-upload-link {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's create a generic class for this as we have more link in other modals that could use this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean the links created by

modalLinks.push('<a href="#" id="modal-msg-close-link">' + key + '</a>');
and
'<a href="#" onclick="flashErrorClose()">' + config["translate"]["webusb"]["close"] + '</a>' +

If so, shall I update the JS to use buttons and as they are using a different class

.modal-msg-links {
update this to use a single class for all error modal links?

Copy link
Collaborator

@microbit-carlos microbit-carlos Dec 19, 2019

Choose a reason for hiding this comment

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

Yes, the WebUSB error modal and the modalMsg modal.

.modal-msg-links {
update this to use a single class for all error modal links?

Not necessarily, that CSS class set-ups the padding and things like that, which would apply as before.

The new class to replace #file-upload-link should only contain the CSS required to make a button look exactly like a link, we then add that css class to all the links reworked into buttons, and keep all the old classes that were already attached to them.

Copy link
Contributor Author

@microbit-mark microbit-mark Jan 8, 2020

Choose a reason for hiding this comment

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

I've updated this, but I'm now stuck at how to now trigger the click for the webUSB not availble modal in' Find Out More'

@microbit-carlos
Copy link
Collaborator

Thanks Mark!
Could you provide a before and after screenshot as well?
There are also other modals with link that could use this for accessibility in macOS Firefox, could you update those too?

@microbit-carlos microbit-carlos self-assigned this Dec 19, 2019
python-main.js Outdated
addCloseClickListener = true;
} else {
modalLinks.push('<a href="' + links[key] + '" target="_blank">' + key + '</a>');
modalLinks.push('<button type="button" aria-label="' + key + '"class="button-link">' + key + '</button>');
modalLinks.onclick=function(){"window.location.href(links[key])"};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Have you tested this? I think this has broken the links in the WebUSB not available modal.
Also, would this not open the link in the same window instead of a new one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got a bit stuck triggering the button, but have fixed this and it should now work

Copy link
Collaborator

@microbit-carlos microbit-carlos left a comment

Choose a reason for hiding this comment

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

Great, thank you Mark!

Co-Authored-By: Carlos Pereira Atencio <carlos@microbit.org>
@microbit-carlos microbit-carlos merged commit 9881de1 into bbcmicrobit:master Jan 9, 2020
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.

2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/bbcmicrobit/PythonEditor/pull/313

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy