New in Craft CMS 4.1
Accessibility
A New `aria-label` would be added to the main navigation and dashboard's column slider. Active global navigation menu items got `aria-current` attribute. They added visually hidden `notification` text for the badges in the navigation to provide additional context.
Overall improved accessibility of matrix fields, address field management, dashboard, element indexes, and pagination.
Other a11y changes:
- Removes list markup from footer items and updates CSS
- Update accessible text for Update to Craft Pro link in footer
- Namespace magnifying glass icon in support widget to prevent duplicate IDs
- Remove aria-label from asset size container
- Darken success checkmark color
User interface
- It is now possible to sort entries by section, type, and file format.
- Condition builders can now include multiple rules with the same label as long as they are in different groups.
- Asset indexes now have an option for the "Location" table attribute.
- The live preview now always displays a Refresh button, regardless of whether the preview target has automatic refresh enabled.
Developer Experience
Field layouts can now have "line break" UI elements. This helps when fields are placed next to each other. Then, if the display of a field is tied to a conditional query, the following field would take the now vacated space instead. Sometimes this makes no sense from a UX perspective. In such a case, the "line break" element now helps, forcing the following fields to stay in row 2, for example, and not advance further, even if there would be space in row 1.
Since Craft 4, it is possible to provide elements as a collection via eager loading. Unfortunately, the syntax is a bit unwieldy if you want to provide only one element:
{% set image = entry.image.collect().first() %}
Craft 4.1 now adds `.one()` to the collections:
{% set image = entry.image.one() %}
To list all the small changes that Craft CMS 4.1 brings with it would be too much of a good thing. If you want to know all the details, it's best to read the changelog.