Commit graph

236 commits

Author SHA1 Message Date
Chris McCord
fba89209bd Merge branch 'master' of github.com:chrismccord/live_beats 2022-01-07 13:42:12 -05:00
Chris McCord
c5b25aa5be Add standalone tailwind 2022-01-07 13:42:04 -05:00
Chris McCord
dff06cf171
Merge pull request #21 from ndarilek/misc-a11y
Add additional region for search region when mobile sidebar is displayed.
2022-01-05 16:02:08 -05:00
Chris McCord
a774838355
Merge pull request #22 from ndarilek/trim-a11y
Simplify a few things
2022-01-05 15:50:22 -05:00
Nolan Darilek
7b48c2fbaf Further simplify post-route handler.
* Use `HtmlElement.tabIndex` directly rather than going through attributes.
* Always restore `tabIndex` after focus.
* Remove `setTimeout` to simplify implementation.

This does have a disadvantage in that it leaves unnecessary `tabindex="1"` instances around. On the other hand, it does simplify the implementation and get the job done' so is probably a more clear example of how to do this correctly.
2021-12-22 12:41:19 -06:00
Nolan Darilek
7d09845b8c Remove unnecessary window.requestAnimationFrame. 2021-12-22 12:06:08 -06:00
Nolan Darilek
57150a4f7a Add additional region for search region when mobile sidebar is displayed. 2021-12-20 12:13:49 -06:00
Nolan Darilek
159363fb4b Add button role to icons to hint that they are actionable. 2021-12-20 11:02:36 -06:00
Nolan Darilek
3860c79ec7 If an icon has aria-labelset, don't set aria-hidden. Also, label some icons. 2021-12-16 15:26:12 -06:00
Chris McCord
bbb9693e8c WIP 2021-12-16 11:06:22 -05:00
Chris McCord
67a291ac3a Revert temporary assign 2021-12-15 22:03:18 -05:00
Chris McCord
8da032fed3 Make songs temporary assigns 2021-12-15 21:51:09 -05:00
Chris McCord
ce1a1fdc5f Do not focus outline h1 in title bar 2021-12-15 12:48:05 -05:00
Chris McCord
9958ba97d0 TODO 2021-12-14 21:09:36 -05:00
Chris McCord
803f0b52cc Test bad inputs 2021-12-14 21:07:02 -05:00
Chris McCord
816eb78064 Add mp3stat test 2021-12-14 21:02:50 -05:00
Chris McCord
c089302881 TODO 2021-12-14 15:40:46 -05:00
Chris McCord
b2950adb2a TODO 2021-12-14 15:31:02 -05:00
Chris McCord
570e86d02c Test song deletion 2021-12-14 15:29:07 -05:00
Chris McCord
dda0cdaa3f Test basic uploads 2021-12-14 15:19:03 -05:00
Nolan Darilek
7fdb30520e Hide title/artist metadata when empty.
From an accessibility perspective, having an empty `<h2/>` is confusing. Even though it lacks text, it remains visible to scree readers and is still navigable.

I'm not sure whether wrapping the entire `<div/>` in this check breaks the layout, or if the individual elements should have `aria-hidden` set if their values are empty.
2021-12-14 12:17:40 -06:00
Chris McCord
c8a6035a02 Fixup tests 2021-12-14 10:35:51 -05:00
Chris McCord
57c193e490
Merge pull request #14 from ndarilek/accessible-routing
Initial work on making routing more accessible
2021-12-13 13:21:04 -05:00
Chris McCord
7db38a70ab
Merge pull request #15 from ndarilek/sidebar-a11y
Improve accessibility of mobile sidebar
2021-12-13 13:19:53 -05:00
Chris McCord
5b81181ea3 Bump for latest gen.release 2021-12-08 13:07:39 -05:00
Chris McCord
63504e6cce Remove uneeded rel files 2021-12-03 15:41:03 -05:00
Chris McCord
1673d90e94 Fix deps 2021-12-03 08:56:33 -05:00
Chris McCord
de310cd1e5 Add latest phx.gen.docker files 2021-12-03 08:54:28 -05:00
Chris McCord
316007b970
Merge pull request #16 from chrismccord/feature/hide_player_buttons
Hide control buttons when listening to someone else's playlist
2021-12-01 13:11:28 -05:00
Berenice Medel
9262895d13 fix typo 2021-11-30 09:03:08 -06:00
Berenice Medel
e5c663ab38 show stop button when listening someone else playlist 2021-11-29 19:23:23 -06:00
Berenice Medel
0e0d349e31 hide play button on playlist 2021-11-29 19:21:35 -06:00
Chris McCord
5e3149ad8e Only active tab user's own profile 2021-11-23 22:06:48 -05:00
Nolan Darilek
ca311dd11d Further sidebar accessibility improvements.
* Set `aria-controls` to the sidebar container.
* Swap button focus as sidebar is revealed/hidden.
2021-11-23 11:41:07 -06:00
Nolan Darilek
ad13a8c364 Partial implementation of ARIA disclosure pattern for sidebar.
* Hide/show buttons to reveal sidebar as appropriate.
* Hard-code `aria-expanded`, since by default only one button is exposed at a given time.
2021-11-23 11:29:49 -06:00
Chris McCord
a325b385b3 Rename link attrs 2021-11-23 09:34:46 -05:00
Chris McCord
7f9b7c5f9a Assign active_tab in handle_params to handle live patches 2021-11-23 09:34:46 -05:00
Nolan Darilek
566a574c0a Initial attempt at accessibly announcing route updates.
* Add handler for `phx:page-loading-stop` that focuses either the first `<h1>` child of `<main>`, or `<main>` directly if no child `<h1>` is present. Make this our focus target.
* Cache original `tabindex` of target, if any, and assign it a temporary `tabindex1 of -1.
* Focus the target.
* After a long timeout, either restore the target's original `tabindex` or remove the temporary -1 value. Short timeouts didn't seem to perform the focus step. Neither did nested `requestAnimationFrame` calls.
2021-11-22 15:25:41 -06:00
Nolan Darilek
7096b98cc2 Add alert role on connection status so it is read automatically on change.
Note: not currently tested since I'm not sure how to force these states, but I did notice them happening from time to time so wanted to try addressing them..
2021-11-22 15:24:10 -06:00
Nolan Darilek
6d95137d1f Set aria-current on active tab to indicate to screen readers which is selected. 2021-11-22 14:20:10 -06:00
Chris McCord
62e00dc447
Merge pull request #13 from ndarilek/graphics-cleanup
Set `aria-hidden="true"` on more SVG graphics, and hide icons by default.
2021-11-22 14:55:17 -05:00
Nolan Darilek
ef1355f897 Set aria-hidden="true" on more SVG graphics, and hide icons by default.
The original icon fix assumed that the `<svg>` tag had an `alt` attribute, which it does not. Instead, SVG requires a child element to specify a description. A complete fix involves patching upstream to allow for setting this element, but since we don't seem to have actionable icons without associated textual controls, set `aria-hidden="true"` by default and require it to be overridden if needed.
2021-11-22 13:50:20 -06:00
Chris McCord
982e626424
Merge pull request #10 from ndarilek/dropdown-a11y
When a dropdown is open, block Tab to avoid navigating away.
2021-11-22 14:29:04 -05:00
Chris McCord
cead091227
Update assets/js/app.js 2021-11-22 14:28:57 -05:00
Chris McCord
a0e64ef901
Merge pull request #12 from ndarilek/cleaner-regions
Minor cleanup to make navigating by region easier.
2021-11-22 14:28:07 -05:00
Nolan Darilek
5cf58b2b77 Minor cleanup to make navigating by region easier.
* Make `<main>` the part of the page that actually changes when the route updates, thus making navigation to page content easier.
* Add labelled region for persistent audio player.
2021-11-22 13:18:06 -06:00
Nolan Darilek
a19a6091e6 When a dropdown is open, block Tab to avoid navigating away.
Under Windows, dropdowns cannot be tabbed off of. They are only closed by either selecting an item or pressing Escape.
2021-11-22 12:55:01 -06:00
Chris McCord
d35554ee0e Link logo placeholder 2021-11-22 13:04:05 -05:00
Chris McCord
55a1e1f02a Logo placeholder 2021-11-22 12:50:42 -05:00
Chris McCord
7209a3121c Add dropdown component 2021-11-22 11:21:11 -05:00