radar-sdk-js
Advanced tools
Comparing version 4.3.0 to 4.3.1-beta.0
@@ -1,2 +0,2 @@ | ||
declare const _default: "4.3.0"; | ||
declare const _default: "4.3.1-beta.0"; | ||
export default _default; |
{ | ||
"name": "radar-sdk-js", | ||
"version": "4.3.0", | ||
"version": "4.3.1-beta.0", | ||
"description": "Web Javascript SDK for Radar, location infrastructure for mobile and web apps.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://radar.com", |
@@ -59,3 +59,3 @@ <p align="center"> | ||
```html | ||
<script src="https://js.radar.com/v4.3.0/radar.min.js"></script> | ||
<script src="https://js.radar.com/v4.3.1-beta.0/radar.min.js"></script> | ||
``` | ||
@@ -77,4 +77,4 @@ | ||
<head> | ||
<link href="https://js.radar.com/v4.3.0/radar.css" rel="stylesheet"> | ||
<script src="https://js.radar.com/v4.3.0/radar.min.js"></script> | ||
<link href="https://js.radar.com/v4.3.1-beta.0/radar.css" rel="stylesheet"> | ||
<script src="https://js.radar.com/v4.3.1-beta.0/radar.min.js"></script> | ||
</head> | ||
@@ -103,4 +103,4 @@ | ||
<head> | ||
<link href="https://js.radar.com/v4.3.0/radar.css" rel="stylesheet"> | ||
<script src="https://js.radar.com/v4.3.0/radar.min.js"></script> | ||
<link href="https://js.radar.com/v4.3.1-beta.0/radar.css" rel="stylesheet"> | ||
<script src="https://js.radar.com/v4.3.1-beta.0/radar.min.js"></script> | ||
</head> | ||
@@ -136,4 +136,4 @@ | ||
<head> | ||
<link href="https://js.radar.com/v4.3.0/radar.css" rel="stylesheet"> | ||
<script src="https://js.radar.com/v4.3.0/radar.min.js"></script> | ||
<link href="https://js.radar.com/v4.3.1-beta.0/radar.css" rel="stylesheet"> | ||
<script src="https://js.radar.com/v4.3.1-beta.0/radar.min.js"></script> | ||
</head> | ||
@@ -140,0 +140,0 @@ |
@@ -19,6 +19,2 @@ import Logger from '../logger'; | ||
const ARIA = { | ||
EXPANDED: 'aria-expanded', | ||
}; | ||
const defaultAutocompleteOptions: RadarAutocompleteUIOptions = { | ||
@@ -140,2 +136,4 @@ container: 'autocomplete', | ||
this.resultsList.classList.add(CLASSNAMES.RESULTS_LIST); | ||
this.resultsList.setAttribute('role', 'listbox'); | ||
this.resultsList.setAttribute('aria-live', 'polite'); | ||
setHeight(this.resultsList, this.config); | ||
@@ -173,2 +171,9 @@ | ||
// set aria roles | ||
this.inputField.setAttribute('aria-expanded', 'false'); | ||
this.inputField.setAttribute('aria-control', 'autocomplete-list'); | ||
this.inputField.setAttribute('aria-haspopup', 'listbox'); | ||
this.inputField.setAttribute('aria-autocomplete', 'list'); | ||
this.inputField.setAttribute('aria-activedescendant', ''); | ||
// setup event listeners | ||
@@ -281,2 +286,4 @@ this.inputField.addEventListener('input', this.handleInput.bind(this)); | ||
li.classList.add(CLASSNAMES.RESULTS_ITEM); | ||
li.setAttribute('role', 'option'); | ||
li.setAttribute('id', `item-${index}`); | ||
@@ -343,3 +350,3 @@ // construct result with bolded label | ||
this.wrapper.setAttribute(ARIA.EXPANDED, 'true'); | ||
this.inputField.setAttribute('aria-expanded', 'true'); | ||
this.resultsList.removeAttribute('hidden'); | ||
@@ -358,3 +365,4 @@ this.isOpen = true; | ||
setTimeout(() => { | ||
this.wrapper.removeAttribute(ARIA.EXPANDED); | ||
this.inputField.setAttribute('aria-expanded', 'false'); | ||
this.inputField.setAttribute('aria-activedescendant', ''); | ||
this.resultsList.setAttribute('hidden', ''); | ||
@@ -389,2 +397,5 @@ this.highlightedIndex = -1; | ||
// set aria active descendant | ||
this.inputField.setAttribute('aria-activedescendant', `item-${index}`); | ||
this.highlightedIndex = index; | ||
@@ -391,0 +402,0 @@ } |
@@ -1,1 +0,1 @@ | ||
export default '4.3.0'; | ||
export default '4.3.1-beta.0'; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
297767
6037
1