Coder Social home page Coder Social logo

dayjo / react-character-map Goto Github PK

View Code? Open in Web Editor NEW
14.0 4.0 9.0 481 KB

A react component giving you a categorised, selectable character map. Useful for WYSIWYG or text editors.

License: MIT License

JavaScript 79.65% CSS 10.04% SCSS 10.32%
react character-map wysiwyg js

react-character-map's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

react-character-map's Issues

React warnings when running in development mode from npm package

When using this component in my project I noticed console warnings:

Warning: Each child in an array or iterator should have a unique "key" prop

I was able to correct this in the dist version of the code by adding unique keys to iterated elements, I'll open a PR here with those fixes.

Improve Accessibility

When using this component I noticed a couple of accessibility issues we can fix. In addition it would be useful to get a more expert accessibility review.

Issues noted

Unable to tab past the categories

When focusing on the component, I am unable to tab past selecting the categories: I have to use my mouse.

Screen reader announcements can be improved

Focus highlights are not completely visible.

Use of a href links should be for navigation, these elements should be buttons

Allow text to be passed as props (for i18n)

This is in reference to 10up's Insert Special Characters WordPress plugin. This issue regarding improvement to the plugin's translation support mentions there are a few pieces of text in this package that are not currently translatable.

I think the solution for this would be to provide defaults in this component (the current text) that can be overridden via props. Then we can pass the props in from downstream, and this repo wouldn't have to implement its own translation.

I'm aiming to submit a PR in the next 1-2 days, unless you would prefer to handle it, @Dayjo.

Is the library still in maintenance ?

Hi, greetings, I like this library is usefully for a feature that I'm working, but maybe I want upgrade a bit the component, with hooks and more custom properties for the classnames or disable the search bar and only leave the categories list, are you interested in those changes if I send a pr soon ? :)

Consider a search feature

Overview.
The character map order is mostly ASCII-related but doesn't really make a lot of human sense, and there are a lot of characters. Making it searchable would enhance usability.

Describe the solution you'd like
Search input that filters on a basic string search that matches from the beginning of string (want to be able to search for a without it matching almost everything, for instance)

Unique class and improper `aria-label` for filter `ul`

For @adamsilverstein:

As I was working on styling this component in our plugin, I noticed in the generated HTML that the ul containing the filter has the charMap--category-menu class and an aria-label of Categories, whereas the actual ul for the list of categories gets the same class but does not get the aria-label. So two things:

  • The aria-label needs to be assigned to the correct element
  • The filter ul should get a different class to be correct and for targeting - perhaps charMap--filter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.