Skip to content

Commit 901035a

Browse files
Merge pull request #606 from ellamdav/README-i18n-doc-fixes
Correct description of `tStatusSelectedOption` i18n option in README and tweak some wording for consistency with other parts of the README
2 parents 92a1c72 + 0b4df9f commit 901035a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Diff for: README.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -300,25 +300,27 @@ A function that gets passed an object with the property `className` (`{ classNam
300300

301301
Type: `Function`
302302

303-
A function that receives no arguments and should return the text used in the dropdown to indicate that there are no results.
303+
A function that receives no arguments and returns the text used in the dropdown to indicate that there are no results.
304304

305305
#### `tStatusQueryTooShort` (default: `` (minQueryLength) => `Type in ${minQueryLength} or more characters for results` ``)
306306

307307
Type: `Function`
308308

309-
A function that receives one argument that indicates the minimal amount of characters needed for the dropdown to trigger and should return the text used in the accessibility hint to indicate that the query is too short.
309+
A function that receives one argument that indicates the minimal amount of characters needed for the dropdown to trigger and returns the text used in the accessibility hint to indicate that the query is too short.
310310

311311
#### `tStatusNoResults` (default: `() => 'No search results'`)
312312

313313
Type: `Function`
314314

315-
A function that receives no arguments and should return the text that is used in the accessibility hint to indicate that there are no results.
315+
A function that receives no arguments and returns the text that is used in the accessibility hint to indicate that there are no results.
316316

317317
#### `tStatusSelectedOption` (default: `` (selectedOption, length, index) => `${selectedOption} ${index + 1} of ${length} is highlighted` ``)
318318

319319
Type: `Function`
320320

321-
A function that receives two arguments, the selectedOption and the amount of available options, and it should return the text used in the accessibility hint to indicate which option is selected.
321+
A function that receives three arguments -
322+
the selectedOption, the count of available options, and the (zero-based) index of the selected option -
323+
and returns the text used in the accessibility hint to indicate which option is selected.
322324

323325
#### `tStatusResults`
324326

@@ -337,13 +339,13 @@ Default:
337339

338340
Type: `Function`
339341

340-
A function that receives two arguments, the count of available options and the return value of `tStatusSelectedOption`, and should return the text used in the accessibility hint to indicate which options are available and which is selected.
342+
A function that receives two arguments - the count of available options and the return value of `tStatusSelectedOption` - and returns the text used in the accessibility hint to indicate which options are available and which is selected.
341343

342344
#### `tAssistiveHint` (default: `() => 'When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures.'`)
343345

344346
Type: `Function`
345347

346-
A function that receives no arguments and should return the text to be assigned as the aria description of the html `input` element, via the `aria-describedby` attribute.
348+
A function that receives no arguments and returns the text to be assigned as the aria description of the html `input` element, via the `aria-describedby` attribute.
347349
This text is intended as an initial instruction to the assistive tech user. The `aria-describedby` attribute is automatically removed once user input is detected, in order to reduce screen reader verbosity.
348350

349351

0 commit comments

Comments
 (0)