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

SAK-42643 - Switching from fonticonpicker to fontawesome-iconpicker f… #8027

Merged
merged 4 commits into from
Mar 28, 2020

Conversation

jonespm
Copy link
Contributor

@jonespm jonespm commented Mar 15, 2020

…or keyboard accessibility and updates

I didn't see any useful updates to the previous picker and it was not keyboard accessible.

This is currently what the new one looks like
image

The old plugin when called turned a input text field into a field that looked like this
image

That seems like it's going to take a little more work with this plugin if we want to achieve that but adding our own custom callbacks. Not sure how important it is to be accessible verses working and looking like it did before.

I tried to get it to look like the "inside dropdowns" view of https://jonespm.github.io/fontawesome-iconpicker/ but seemed like it would require changing all of the current input's over to a hidden, adding a button AND modifying the callback to update the hidden value. Whenever I just had it a button with the value updated there wasn't anything posted. . .

Happy for feedback or someone else to commit on top of this. I might go back to experimenting with the button again.

@jonespm
Copy link
Contributor Author

jonespm commented Mar 16, 2020

I updated this to look like the below in the code. I think this is fine, just will need to check the other tools that use this and make sure they're wrapped correctly.

image

@ern ern added the future label Mar 16, 2020
Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

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

There are accessibility issues in these changes.

@jonespm jonespm marked this pull request as ready for review March 23, 2020 01:12
@jonespm jonespm requested a review from mpellicer March 23, 2020 01:12
@jonespm
Copy link
Contributor Author

jonespm commented Mar 23, 2020

Okay this looks good. There's one more issue where if you are navigating with the keyboard and get to the icon picker, after you select an icon the focus goes to a random place on the page rather than to the next element.

I'm having to call this to get the focus into the input
event.iconpickerInstance.popover.find('input').focus()

Maybe it will have to focus back on the actual input again? Or the one after? Will have to look at that but maybe some other ideas?

Copy link

@mpellicer mpellicer left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks @jonespm for the good work!

library/pom.xml Show resolved Hide resolved
@steveswinsburg
Copy link
Member

Codacy Here is an overview of what got changed by this pull request:

Complexity increasing per file
==============================
- library/src/webapp/js/headscripts.js  1
         

See the complete overview on Codacy

@mpellicer mpellicer merged commit c041445 into sakaiproject:master Mar 28, 2020
ern pushed a commit that referenced this pull request Apr 20, 2020
#8027)

* SAK-42643 - Switching from fonticonpicker to fontawesome-iconpicker for keyboard accessibility and updates

* More code to create a better looking input field dynamically rather than having to hardcode it

* Some code formatting and fixing up layout in LTI

* Update pom.xml

Co-authored-by: Miguel Pellicer <[email protected]>
(cherry picked from commit c041445)
@jonespm jonespm deleted the SAK-42643 branch October 13, 2020 15:07
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.

4 participants