You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the realization that we would not be able to complete the bespoke navigation option in the time available, I have re-written the ADR to explain our decision-making.
Copy file name to clipboardExpand all lines: docs/architecture-decisions/0005-implement-an-accessible-navigation-system.md
+50-41Lines changed: 50 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# 5. Implement an accessible navigation system
1
+
# 5. Using SmartMenus 1 for navigation menus
2
2
3
3
Date: 2024-03-22
4
4
@@ -8,12 +8,16 @@ Accepted
8
8
9
9
## Context
10
10
11
-
Our initial releases of this theme used the [SmartMenus](https://www.smartmenus.org/) library to build its
11
+
Our initial releases of this theme use the [SmartMenus](https://www.smartmenus.org/) library to build its
12
12
navigation menus. While this library is easy to implement and pretty useful, its
13
13
output was flagged during usability and accessibility testing as needing some
14
14
improvements.
15
15
16
-
The markup which the user finally interacts with looks like this:
16
+
The problem is that, for users relying on a keyboard or a screen reader to
17
+
navigate the platform, attempting to close a submenu in the navigation also
18
+
causes the user follow the link to the submenu's parent page.
19
+
20
+
The markup which the user interacts with looks like this:
17
21
18
22
```html
19
23
<navaria-label="Under the Lens: Women Biologists and Chemists at MIT (1865-2024)">
@@ -36,22 +40,32 @@ The markup which the user finally interacts with looks like this:
36
40
```
37
41
38
42
The issue is that the element triggering the flyout menu (the
39
-
`<span class="sub-arrow"></span>` tag) is _inside_ the anchor element, making it
40
-
challenging (if not impossible) for users of assistive technologies to separate
41
-
their interactions with the menu link and the submenu toggle.
43
+
`<span class="sub-arrow"></span>` tag on line six above) is _inside_ the anchor
44
+
element, making it challenging for users relying on screen readers or keyboard
45
+
navigation to get around an exhibit. While it is possible to open all of the
46
+
submenus like this, attempting to close a submenu gets intercepted by the
47
+
containing anchor element, resulting in an unintentional navigation to that
48
+
page.
49
+
50
+
Omeka provides other ways to get around an exhibit - for example the Next and
51
+
Previous buttons on all pages, and individual pages can also provide blocks of
52
+
links to their child pages. As a result, we believe that Omeka is still usable
53
+
by users who rely on these technologies - but this is a bug which should be
54
+
prioritized for resolution.
42
55
43
56
The current release of SmartMenus (1.2.1) does not support placing this toggle
44
57
element outside of the link element, so it will be necessary to replace it with
45
-
a library which does support this behavior.
58
+
a library which does support this behavior. We have evaluated several options
59
+
for resolving this issue:
46
60
47
61
48
62
### Option 1: SmartMenus 2
49
63
50
64
The maintainer for SmartMenus is aware of this problem in the library, as we and
51
65
others have reported it via GitHub (see [issue 204](https://github.com/vadikom/smartmenus/issues/204) and [issue 231](https://github.com/vadikom/smartmenus/issues/231)). He has
52
66
committed to including this as an improvement in the future release of
53
-
SmartMenus 2, and the documentation already available [includes this among its available
54
-
features](https://configurator.smartmenus.org/).
67
+
SmartMenus 2, and the documentation already available [includes this among its
68
+
available features](https://configurator.smartmenus.org/).
55
69
56
70
However, at the time of writing [SmartMenus 2 is only available via one alpha
57
71
release](https://github.com/vadikom/smartmenus/releases) - and the maintainer has [cautioned us against using it in a production
@@ -168,47 +182,42 @@ The styling rules required for this approach should likewise be minimal.
168
182
169
183
#### Drawbacks of a bespoke approach
170
184
171
-
The maxim "if you aren't using a framework, you are building one" applies here.
172
-
While the amount of code required is small, it is still code for which we are
173
-
responsible. That code will require us to commit to maintaining the knowledge of
174
-
how it works and how to troubleshoot it, and to commit to having the bandwidth
175
-
to respond to problems as they are reported.
176
-
177
-
This bespoke approach is also not just javascript, but all the associated
178
-
styling rules for the menu to be rendered in both a vertical and horizontal
179
-
layout.
185
+
While conceptually simple, the bespoke approach proved to be beyond our
186
+
current bandwidth by the time all the use cases were resolved.
180
187
181
-
In addition, because this code is so small, it has likely been written by some
182
-
other group of developers - and it would be preferable to leverage their work
183
-
rather than repeat it.
188
+
We attempted to develop a bespoke navigation library for this theme, starting
189
+
from the code which Rich shared. The result of those efforts can be found on
190
+
the [post-107-bespoke](https://github.com/MITLibraries/mitlibraries-theme-omeka/tree/post-107-bespoke) branch of this repository.
184
191
185
-
Ultimately, though, the review which we've conducted of existing menu libraries
186
-
has not identified such a suitable existing library at this time.
192
+
Follow-up testing showed that the solution was more suitable for users who rely
193
+
on assistive technologies, but the interaction needs for sighted and desktop
194
+
users were not adequately met in the available timeframe.
187
195
188
196
189
-
## Decision: Option 4
197
+
## Decision: Keep using SmartMenus 1, at least for now
190
198
191
-
We will implement option 4 - a bespoke solution. We will develop, and maintain,
192
-
a small set of javascript and stylesheet rules for the navigation menu in this
193
-
theme.
199
+
With the failure of option 4 to coalesce into a generally suitable solution in
200
+
the time available, we are choosing to continue using SmartMenus 1, at least in
201
+
the short term.
194
202
195
-
If this proves sustainable, the feature will be considered for promotion to the
196
-
overall style library in order to make the feature available to our other
197
-
web applications.
203
+
We will continue to watch for future releases of SmartMenus which may resolve
204
+
this problem. This work has also identified the need for a general navigation
205
+
solution within [our style library](https://mitlibraries.github.io/mitlib-style/), which could provide an opportunity for us to
206
+
return to this problem space and devote additional time to finishing the bespoke
207
+
approach.
198
208
199
-
Our ultimate preference for an externally-defined navigation library will mean
200
-
that we continue to monitor the development of both SmartMenus and Accessible
201
-
Menu, with an eye toward adopting one should a suitable version be released.
209
+
The remaining items that need to be resolved have been noted in that branch, in
210
+
the form of a [punch list](https://github.com/MITLibraries/mitlibraries-theme-omeka/blob/post-107-bespoke/docs/navigation-notes.md) that was maintained during the initial development.
202
211
203
212
204
213
## Consequences
205
214
206
-
We will work from the prototypes and examples which Rich has provided and write
207
-
our own bespoke solution for navigation menus in Omeka. This solution will:
215
+
The usability of our digital exhibits platform is less straightforward than we
216
+
want it to be.
217
+
218
+
The theme applied to this platform remains somewhat simpler without a bespoke
219
+
navigation system that would need ongoing maintenance.
208
220
209
-
1. Make use of appropriate HTML tags as much as possible, with toggles for
210
-
triggering submenus separate from the navigation links - at any depth.
211
-
1. Implement minimal javascript.
212
-
1. Include styling rules for both a horizontal and vertical implementation,
213
-
while the markup and javascript for each will be the same.
214
-
1. Be evaluated for promotion to our style guide.
221
+
Our organization as a whole continues to not have a navigation menu as part of
222
+
its style library. As a result, our various platforms with navigation menus all
223
+
implement their own approaches to a shared problem.
0 commit comments