alphagov / reported-bugs

Tracking bugs in browsers, assistive technologies and operating systems that have been reported by GDS
5 stars 2 forks source link

NVDA does not read label or description when following a link to an input #8

Open 36degrees opened 5 years ago

36degrees commented 5 years ago

Upstream bug: https://github.com/nvaccess/nvda/issues/6209#issuecomment-428116805 Date: 2018-10-09 Reported by: Oliver Byford Related to: https://github.com/alphagov/govuk-frontend/pull/1056#issuecomment-439381905


Overview

Given the following HTML snippet:

<a href="#textinput">Link to input</a>

<label id="textinput-label" for="textinput">Label for text input</label>
<span class="error" id="textinput-error">Error for text input</span>
<input id="textinput" type="text" aria-describedby="textinput-error" value="Current value">

The expected behaviour would mirror NVDA's existing behaviour when focussing an input by tabbing to it:

  1. Click the link 'Link to text input'
  2. The input is focussed
  3. NVDA announces "Label for text input, edit has autocomplete, error for text input, selected, current value"

The actual behaviour is that NVDA omits both the label and the error message (associated using aria-describedby):

  1. Click the link 'Link to text input'
  2. The input is focussed
  3. NVDA announces "Edit has autocomplete, current value"

In our testing this same problem exists when linking to all types of inputs, including textareas, selects, radio buttons and checkboxes.