Trends and signals

Scope <smart-scope>

Scope is an oscilloscope display for time-domain signals.

Accessibility Attributes

The Scope is drawn on a canvas, which is not accessible to a screen reader. Everything drawn on the canvas is therefore also available as text: the header contains the timebase, the sample rate and the trigger settings; the acquisition state is shown as a word as well as a colour; the measurement readout lists every value per channel; and the cursor readout contains the interval and the value of each channel at each cursor. The channel legend is a composite widget with one tab stop and arrow key navigation, so channels can be shown and hidden from the keyboard.

The following ARIA attributes are used inside the Scope:

  • role="img" - set on the plot area that holds the canvas. A canvas has no readable structure, so the plot needs a text alternative; the legend and the readout outside it stay operable.
  • aria-label - names the scope with its channels, timebase and trigger state - "Oscilloscope. Gate drive, 2 channels, 100 µs per division, Trig'd". It is rewritten on every capture. For the numbers, the measurement readout is real text and updates in place, and it is what a reader should be pointed at.
  • role="group" - set on the channel legend, with an aria-label, so the channel buttons are announced as one named group; and role="list" on the measurement readout, with an aria-label, so the values are announced as one named list.
  • aria-pressed - set on each channel button, indicating whether that channel is currently drawn.
  • tabindex - managed as a roving tab stop across the channel buttons: one is 0, the rest -1.
  • aria-disabled - indicates that the chart is disabled.

Keyboard Interaction

The following keyboard shortcuts are available to interact with the Scope:

Key Action
Tab Moves into the legend, landing on the channel that holds the tab stop, and out again. The legend is one stop however many channels there are.
Arrow Left/Right Moves between the channels. Reversed when rightToLeft is set.
Home / End Moves to the first / last channel.
Enter or Space Shows or hides the focused channel, raising channelVisibilityChange.

The graticule itself takes no keyboard focus. There is nothing on it to operate, the trigger, timebase and cursors are properties set by the application, and the application's own controls for them carry the keyboard interaction.

Localization

All strings the Scope exposes to assistive technology come from its messages property, so they can be provided in the user's language. Set locale to select a language and add a language through messages. Assigning messages replaces the whole object, so include the existing languages when adding one: el.messages = Object.assign({}, el.messages, { de: pack }); If the built-in en pack is dropped, switching back to English shows raw message keys.

The Scope uses the following message keys:

  • chartLabel, chartSummary, noSignal
  • header, trigger, triggerEdgeRising, triggerEdgeFalling
  • triggered, auto, waiting, stopped, armed, paused
  • channelLabel, channelHidden, legendLabel
  • measurementsLabel, cursorsLabel, cursorDelta, cursorValue
  • one key per measurement: vpp, vrms, vmean, vmax, vmin, frequency, period, riseTime, fallTime, dutyCycle

German, French, Spanish and Chinese packs are included in the Smart.Industrial package. Strings that are also exposed as properties default to empty and fall back to the pack, so the default text stays translatable while an explicit property value takes precedence.

Additional information on WAI-ARIA for the SMART Framework can be found here.