It's not available during, and breaks, site installation. The output
class doesn't necessarily need it in 78db6bbce8, so switch to simple
templatable interface instead.
- Refactot context_header class to implement named templatable so
render_context_header in core and theme_boost can be removed
- Refactor context_header to use templates
- Fix context header layout and styles
* A presentation role is not necessary for the img tag.
- If a non-empty alt text is provided, the presentation role will
conflict with the alt text.
- An empty alt text denotes a decorative image. The presence of a
presentation role is redundant.
* Make sure that the alt text is set to an empty string. Otherwise,
an img tag without an alt attribute will be produced which is an
invalid markup.
This has been generated running the following Sniffs, all
them part of the Moodle's CodeSniffer standard:
- PSR12.Functions.ReturnTypeDeclaration
- PSR12.Functions.NullableTypeDeclaration
- moodle.Methods.MethodDeclarationSpacing
- Squiz.Whitespace.ScopeKeywordSpacing
All them are, exclusively, about correct spacing, so the changes
are, all them, only white space changes.
Only exceptions to the above are 3 changes what were setting the
return type in a new line, and, when that happens, the closing
parenthesis (bracket) has to go to the same line than the colon.
\action_menu_link::$instance is only being used to provide unique IDs
for the <span> tag that contains the text within the action menu link's
<a> tag. This <span> tag's ID is then being used for the action menu
link's <a> tag's aria-labelledby attribute which is totally unnecessary
given that the <span> tag is already within the action menu link and
already serves as the default label for the <a> tag.
Action menus have a method set_kebab_trigger that converts the action
menu button into a proper kebab icon. However, this method does not
remove the standard bootstrap dropdown chevron and the visual
information is replicated (kebab icon + chevron). For now this method is
only used a couple of times but in every case (grade, course...) they
add unnecessary adhoc css rules to hide the chevron when it should be
the standard behaviour. This commit remove the chevron when the action
menu is displayed as a kebab menu.
Many times the action menu item triggers modals to show more information
to the user. In most cases this is enough, however, a modal will close
the menu and the user is not able to see the modal content in the page
context. To solve this now menus can define subpanels that are displayed
next the the menu item when the item is focused or hover. This will be
used to group options like the group mode in activities or to replace
the adhoc solution implemented to select language in the user menu.
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
When questions are filtered by tags in the question bank, the qtagids
params are passed in the array format. Though moodle_url handles this,
single_button::export_for_template cannot. Hence changes done in
weblib.php to provide params for export_for_template in the
suitable format.
Thanks Huong. I have added the Behat test you provided in the patch.
* Add "Preview" and "Use this preset" menus to the preset plugin page's
burger menu
* Refactor importmapping dialogue to use the 'data-action' selector
* Add a new set_kebab_trigger action menu method
* Use set_additional_classes method for action menu
* Remove redundant parameter to add_action_menu
Each template should display at the top the information about the
user who has created the entry, when it was created and modified.
Apart from that, this commit also includes:
- For the Journal preset, a link on each card entry title has been
added, to open the Single view.
- For the Resources preset, the Author field has been renamed to
"Author of resource" and the Description to "Content".
- For the Resources preset, the Author and Type fields will be
hidden in the List view for small devices.
* As per WAI ARIA Authoring Practices 1.1 guidelines for menus,
menu items should have a tab index of -1. Navigation between menu items
is done via arrow keys.
See https://www.w3.org/TR/wai-aria-practices-1.1/#menu
The menubar role defined in the "menubar d-flex" element is not
required and it's causing the following error "Required ARIA children
role not present: group, menuitemradio, menuitem, menuitemcheckbox".
- Part of: MDL-69588
This changes the context header to switch the breadcrumbs to the
top in boost. It also changes the context header in the modules
to have the activity name instead of the course name, and adds
an icon for the activity.
This class would belong more appropriately within the 'user' API
(core_user) instead of within the 'core' API, since it is
directly related to user data.
Since the class has only just been added to Moodle, now is a good
time to move it.