Skip to content

Accessibility (a11y)

Kevin Greer edited this page Oct 16, 2024 · 1 revision

Accessibility (a11y)

FOAM supports a11y through the use of the 'speechLabel' property, which is available on Properties and Actions.

ex.

CLASS({
  name: 'Thing',

  properties: [
    {
      name: 'something',
      speechLabel: 'Speech Label'
    }
  ],

  actions: [
    {
      name: 'fire',
      speechLabel: 'Fire Action',
      action: function() { ... }
    }
  ]
});

Specifying speechLabels will cause the appropriate aria labels to be added to input fields and buttons. Speech labels are internationalized.

Clone this wiki locally