PyScript accessibility

I love the promise of PyScript. “Programming for the 99%” sounds like a vision centred in inclusivity. To cement this principle I’d like to see a commitment to digital accessibility and the web content accessibility guidelines.

A quick look at the current demos suggests that there is room for improvement with respect to accessibility. Testing for accessibility is a difficult skill to acquire but some simple tests will help improve current and future demos.

  • Test the HTML with the HTML validator and aim for valid HTML
  • Test the HTML with the axe extension for Chrome and fix any errors axe finds
  • Make sure the interface is keyboard accessible

In addition to the demos, I think it’s critical that PyScript components are accessible.

Ensuring accessibility will allow all programmers to participate in the community and enjoy the many tools to be created with PyScript.

Will values be written for PyScript? If so, will accessibility be included?

2 Likes

Have you found any specific problems?

Just adding a couple of links (I was limited on links I could include in my first post).

1 Like

Hi @john.hanley

Yes, there are a few issues. This is just a sample based on a quick look.

Simple clock example:

  • HTML validator does not like the <py-env> tag inside the head
    • This problem exists for all examples where <py-env> is used within <head>

Repl 2:

I recommend running all examples through the HTML validator and axe to get a full set of results. Axe can be included as part of CI/CD.

1 Like

Very interesting. Thank you. I plan to use your information to investigate further.