- Completed the first challenge that includes JavaScript.
- Implemented both clicking and keyboard functionality.
- Faster completion of the static webpage part.
- Should have used state variables.
- Creating the accordion with only one item open at a time - had to make use of extensive class manipulation to achieve the desired effect.
- Adding keyboard navigation on top of the clicking functionality proved difficult due to the default behaviour of some events. Pressing Enter would focus the next item, so I managed to stop it using
e.stopPropagation()
- Adding dividers as div elements between the accordion items broke the keyboard navigation - had to remove them and add padding and
border-bottom
instead
- There is probably a more efficient way of managing state for the opened/closed items.
- Refactoring the code to something less repetitive.
- Sizing the page elements with less reliance on media queries.