README 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. Accessible Blockly
  2. ==================
  3. Google's Blockly is a web-based, visual programming editor that is accessible
  4. to blind users.
  5. The code in this directory renders a version of the Blockly toolbox and
  6. workspace that is fully keyboard-navigable, and compatible with JAWS/NVDA
  7. screen readers on Firefox for Windows. (We chose this combination because JAWS
  8. and NVDA are the most robust screen readers, and are compatible with many more
  9. aria tags than other screen readers.)
  10. In the future, Accessible Blockly may be modified to suit accessibility needs
  11. other than visual impairments. Note that deaf users are expected to continue
  12. using Blockly over Accessible Blockly.
  13. Using Accessible Blockly in Your Web App
  14. ----------------------------------------
  15. The demo at blockly/demos/accessible covers the absolute minimum required to
  16. import Accessible Blockly into your web app. You will need to import the files
  17. in the same order as in the demo: utils.service.js will need to be the first
  18. Angular file imported.
  19. When the DOMContentLoaded event fires, call ng.platform.browser.bootstrap() on
  20. the main component to be loaded. This will usually be blocklyApp.AppView, but
  21. if you have another component that wraps it, use that one instead.
  22. Customizing the Toolbar
  23. -----------------------
  24. The Accessible Blockly workspace comes with a customizable toolbar.
  25. To customize the toolbar, you will need to declare an ACCESSIBLE_GLOBALS object
  26. in the global scope that looks like this:
  27. var ACCESSIBLE_GLOBALS = {
  28. toolbarButtonConfig: []
  29. };
  30. The value corresponding to 'toolbarButtonConfig' can be modified by adding
  31. objects representing buttons on the toolbar. Each of these objects should have
  32. two keys:
  33. - 'text' (the text to display on the button)
  34. - 'action' (the function that gets run when the button is clicked)
  35. Limitations
  36. -----------
  37. - We do not support having multiple Accessible Blockly apps in a single webpage.
  38. - Accessible Blockly does not support the use of shadow blocks.