David Graham
2357f22783
Update development dependencies
2018-08-01 12:05:19 -06:00
Mu-An ✌️ Chiou
69d01ea833
Only commit changes if results are displayed
2018-07-30 22:39:58 -04:00
Mu-An ✌️ Chiou
8fcad66226
Add form submit example
2018-07-30 22:39:45 -04:00
Mislav Marohnić
cc04f14d59
0.4.0
2018-06-29 15:51:17 +02:00
Mislav Marohnić
455fc67b96
Merge pull request #5 from github/no-data-autocomplete-value
...
Alleviate hard requirement on `data-autocomplete-value`
2018-06-29 15:49:16 +02:00
Mislav Marohnić
bf2d3c9317
Use another example for `data-autocomplete-value`
...
To avoid conflating it with `aria-disabled` above.
2018-06-29 15:39:32 +02:00
Mislav Marohnić
b134bb4cf4
Merge pull request #6 from github/allow-relative-src
...
Allow relative URLs in `<auto-complete src="...">`
2018-06-29 15:25:45 +02:00
Mislav Marohnić
4454984a05
Merge pull request #7 from github/example-chrome-fix
...
Fix example in Chrome
2018-06-29 15:23:52 +02:00
Mislav Marohnić
4d7da9ece2
Add encoding directive to the example document
2018-06-29 00:07:20 +02:00
Mislav Marohnić
3d769d193a
Fix example in Chrome
...
When `connectedCallback` runs for `<auto-complete>` element while the
document is still parsing, its contents is still unavailable.
https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#Using_the_lifecycle_callbacks
It is not clear whether we need to restructure our `connectedCallback`
to be more resilient to this case. In the meantime, fix the example
document by defining the `auto-complete` element at a time that the
document is fully loaded.
2018-06-29 00:04:05 +02:00
Mislav Marohnić
e5f4325978
Allow relative URLs in `<auto-complete src="...">`
...
The URLs are now relative to the current document's URL, rather to the
domain root. Previously, all relative URLs were effectively treated as
absolute.
This also fixes `<auto-complete>` when loaded over `file:` protocol in
Firefox, where `location.origin` is `"null"`.
2018-06-28 23:52:23 +02:00
Mislav Marohnić
f5c26af2a9
Merge pull request #4 from github/keydown-safe
...
Avoid exceptions raised when keyboard shortcuts are used with no results
2018-06-28 23:13:04 +02:00
Mislav Marohnić
fc91f91a97
The `data-autocomplete-autofocus` attribute has no effect here
2018-06-28 17:25:39 +02:00
Mislav Marohnić
0debd5e42a
Alleviate hard requirement on `data-autocomplete-value`
...
The `data-autocomplete-value` attribute is optional since invididual
items fall back to `.textContent` for their values. Instead, check if
there are any results by querying elements with `role="option"`, which
is depended on elsewhere in the codebase too.
2018-06-28 17:25:30 +02:00
Mislav Marohnić
e2eb6b5d66
Avoid keyboard shortcuts leading to exceptions for no results
2018-06-28 17:10:16 +02:00
Mislav Marohnić
58a997b71c
Speed up the test by reacting to `loadend`
2018-06-28 17:03:20 +02:00
Mislav Marohnić
ee621b1521
Simpler setup and teardown of mocha fixture element
2018-06-28 17:03:02 +02:00
David Graham
d222257113
Update development dependencies
2018-06-27 15:00:11 -06:00
Kristján Oddsson
d8ecd0bcd6
0.3.0
2018-06-13 10:44:34 +01:00
Kristján Oddsson
833026ed48
Merge pull request #3 from github/commit-to-value-on-tab-press
...
handle 'Tab' keypresses the same way as 'Enter' is handled
2018-06-13 10:41:41 +01:00
Kristján Oddsson
d411968a66
do not prevent event when hitting `Tab`
2018-06-12 13:22:22 +01:00
Kristján Oddsson
757b9425aa
handle 'Tab' keypresses the same way as 'Enter' is handled
2018-06-06 17:01:19 +01:00
David Graham
6bc438ed82
Use scoped package name
2018-05-17 17:57:52 -06:00
David Graham
d849f4d3b9
0.2.0
2018-05-17 17:48:06 -06:00
David Graham
f45cdb718a
Merge pull request #1 from github/aria
...
Accessible keyboard navigation
2018-05-17 17:41:41 -06:00
David Graham
6bafe36564
Scroll selected list item into view
2018-05-17 17:37:33 -06:00
David Graham
585343f18a
Bind Control-n keyboard shortcut only on macOS
2018-05-17 14:54:54 -06:00
David Graham
849b587c1a
Require aria-owns relationship
...
The aria-owns attribute must be configured correctly for the combo box
relationship between the input and result list to work.
2018-05-16 20:00:54 -06:00
David Graham
3fb228c0e0
Announce list items with aria-activedescendant
2018-05-16 19:48:42 -06:00
David Graham
2d2f6a2a13
Use first child input element
...
Simplify the relationship between the combo box parent and its input
field.
2018-05-16 18:07:12 -06:00
David Graham
0c96ef6424
Remove results element
...
The combo box composite widget is composed of two elements: an input
field and a popup results container.
2018-05-16 18:02:58 -06:00
David Graham
864920e72d
Stub abort method
2018-05-16 17:34:43 -06:00
David Graham
c02d40831e
Ignore selection of disabled list options
2018-05-16 17:32:37 -06:00
David Graham
8e983a5b44
Commit selection result on click
2018-05-16 16:19:59 -06:00
David Graham
431efee8e9
Select item on enter key press
2018-05-16 15:25:35 -06:00
David Graham
4e90bb69c2
Add arrow key list item navigation
2018-05-16 15:16:44 -06:00
David Graham
aa80ad0de6
Label combo box elements
2018-05-16 14:37:04 -06:00
David Graham
3db793d188
Add option role to list items
2018-05-16 14:30:53 -06:00
David Graham
bf5d37a18c
Add example demo page
2018-05-16 13:49:40 -06:00
David Graham
67dcd6f84e
Fix combo box expanded state on close
2018-05-15 18:24:24 -06:00
David Graham
bb91fb2f0e
Add ARIA roles and attributes
...
Connects the combo box, input field, and popup list into a single
component.
2018-05-15 18:21:24 -06:00
David Graham
2303502450
0.1.2
2018-04-14 08:50:41 -06:00
David Graham
8b22925d0e
Replace async/await with then/catch
...
Backwards compatibility for browsers without async syntax support.
2018-04-14 08:47:14 -06:00
David Graham
7ce3095a0a
0.1.1
2018-04-12 14:52:37 -06:00
David Graham
07ba596e25
Add Travis configuration
2018-04-12 14:45:49 -06:00
David Graham
677a3d3904
Add scope to package name
...
Avoids a "package name too similar" error during npm publish.
2018-04-12 14:37:58 -06:00
David Graham
233e2b0ea8
0.1.0
2018-04-12 14:21:56 -06:00
David Graham
e24ae898db
Test server auto-complete requests
2018-04-11 17:01:23 -06:00
David Graham
cb7b56d6ac
Lint test files
2018-04-11 14:47:19 -06:00
David Graham
ef41de379b
Add start of test suite
2018-04-11 13:55:40 -06:00