vakata / jstree

jquery tree plugin
http://jstree.com
MIT License
5.15k stars 1.38k forks source link

Accessibility Improvement for v4 #2449

Closed ouija closed 1 year ago

ouija commented 4 years ago

Hi there,

Thanks for providing such a great plugin! Can I make a suggestion/improvement for version 4 that the use of <i> tags (for icons) be replaced to something more "accessibly-friendly", such as a <span> tag?

This is to help reduce errors thrown with such accessibility tools like SiteImprove, which throw errors when <i> tags are found, and also notes that "even though 'i' tags are commonly used for inserting icons, this is considered bad practice."

Thank you!

vakata commented 4 years ago

I will keep that in mind - thank you. The bigger issue is accessibility altogether for v.4, as the main renderer I intend to use is a flat one - I still do not know how it will work in screen readers.

vakata commented 4 years ago

To elaborate:

How do you feel about the current default renderer in regard to accessibility. It is a flat list of divs - an infinite scroller. My understanding of the tree spec is that it will not work with screen readers. Do you think something can be done, or should we simply include a hierarchial renderer (similar to v.3) and leave it to the developer to choose the renderer? The latter is simpler, but it promotes bad practices - most developers will probably go with the faster and lighter infinite scroller and break accessibility. The v.4 code is in an early stage (but works) in a branch in this repo.