Skip to content

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

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
} 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