The sort button on the Elements page says "Sorting is not connected yet." Sorting is one of the functions the beta delivery is assessed on, and the API already supports it (`sort: CatalogSort` on `searchCatalog`: field `CODE`, `DIFFICULTY` or `NAME`, direction `ASC` or `DESC`). ### What to do - Let the user choose the field (Code, Difficulty, Name) and the direction (ascending, descending). The button shows the current choice, as it does now ("Code · Ascending"). - **Difficulty** only works together with an apparatus filter: the API answers `BAD_USER_INPUT` without one, because element values and vault D-values cannot be compared. Disable it (with a short reason) until an apparatus is chosen. - Put the sort in the address (`&sort=difficulty&dir=desc`), like the search and the filters. - A new sort starts from the first page. - Accessibility: the menu works with the keyboard, and the chosen option is announced. ### Done when - [ ] Each field and direction changes the order of the results. - [ ] Difficulty can only be chosen with an apparatus filter. - [ ] The sort is in the address. - [ ] Tests cover the fields, the direction, the address and the Difficulty rule.