docbrown/app/javascript/packs/admin/flashMessages.js
Andy Zhao 33e9bac0f7
Filter admin users by status (#16238)
* Use correct table heading for username

* WIP add role filter and crayonsify forms

* styling

* responsive

* Add form back in that was removed by merge conflict fix

* Suggest only valid search options

* Add basic tests for search and filter by role

* Add aria for search field

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Add email to aria

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

Co-authored-by: Paweł Ludwiczak <ludwiczakpawel@gmail.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
2022-03-02 11:13:59 -05:00

6 lines
385 B
JavaScript

const [firstFlashDismissBtn] =
document.getElementsByClassName('js-flash-close-btn');
// This allows screen reader users to become aware of the message (as well as bringing focus to the top of the main content).
// (we don't use aria-live or role="alert" on the message text as these are not reliably announced for content that exists from page load)
firstFlashDismissBtn?.focus();