- ActionSingle was used in 2 places:
1. As a single button in the menu
2. As an item in NcActions
- NcActions doesn't fully support non-direct NcAction* children
- Move NcActionButton usage from ActionSingle to a new component
- This new component is named NcActionButton so that NcActions will consider it to be a valid NcAction* component
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
- Since `@nextcloud/vue@8.6.0` correct attributes are covered by `NcAction*` and `NcButton` components, including fixes:
- Attribute should display not only active `attr="true"` state, but also non-active `attr="false"`
- It should be `aria-pressed` for buttons and `aria-checked` for menu items instead of `aria-selected`
- Set correct `type` and active state
- `type="radio"` for a list of options like `Heading`
- `type="checkbox"` for toggle buttons like `Bold`
- `type="button"` for general buttons widhout active state like `Undo`
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
- `aria-pressed` is not valid for a menu trigger button
- As alternative solution - show that there is a selected value directly in the text
- Remove incorrect prop for NcActions
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
- `aria-activedescendant` should identify a visually focused element when the real focus remains on this element.
In the current implementation it identified selected element (even when the menu is closed), not the focused.
- `aria-activedescendant` is not needed because NcAction has actual focus anyway.
In case it will be actually needed, it should be implemented in the `NcActions`
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
- It must have string `"true"/"menu"` value
- It must be placed on the `button` itself
- It is already correctly set by `NcActions` and `NcPopover`
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
All these roles are correctly set by `NcAction*` components when needed.
Setting these roles in mixins and menu bar puts them on wrong elements.
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
We no longer allow custom link click handlers in Text. Instead, the
reference widgets for link previews have to implement their own click
handlers.
Signed-off-by: Jonas <jonas@freesources.org>
New link click behaviour:
* Link left clicks without Ctrl/Meta open link bubble (Fixes: #3691)
* Link left clicks with Ctrl/Meta open link in new tab
* Link middle clicks open link in new tab
* Link middle clicks on Linux don't paste content (Fixes: #2198)
* No more custom open link handler in editor
Implementation details:
* Moved link click handler plugins back into Link mark class.
* Added 'data-md-href' attribute to a-elements in DOM, to be used in
onClick handlers.
Signed-off-by: Jonas <jonas@freesources.org>