You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: general/development/policies/accessibility.md
+39-7
Original file line number
Diff line number
Diff line change
@@ -126,40 +126,72 @@ All pages should have a unique title that describes the current page.
126
126
Some tips for providing a meaningful page title:
127
127
128
128
- The page title must be accurate and informative.
129
-
- If the page causes a change of context (e.g. a search functionality), it should describe the result or change of context to the user.
129
+
- If the page causes a _change of context_ (for example, a search functionality), it should describe the result or change of context to the user.
130
130
- It should be concise.
131
131
- If possible, it should uniquely identify the page.
132
132
- The most identifying information should come first.
133
133
134
+
:::note change of context
135
+
136
+
(not to be confused with Moodle's `\core\context` class and its implementations)
137
+
138
+
According to the [WCAG 2.1 Understanding Docs](https://www.w3.org/WAI/WCAG21/Understanding/on-focus.html#dfn-changes-of-context), a change in context is a major change that, if made without user awareness, can disorient users who are not able to view the entire page simultaneously. It can include changes of user agent, viewport, focus, or content that changes the meaning of the web page.
139
+
140
+
:::
141
+
134
142
#### Example
135
143
136
-
Consider that a student in the submission page of an assignment called `Kinetics problem set 1` in the `Physics 101`in the `Moodle University`.
144
+
Consider that a student is on the submission page of an assignment activity called `Kinetics problem set 1` in the `Physics 101`course on the `Mount Orange School` Moodle site.
137
145
138
146
Then a suitable page title for the page would be something like:
139
147
140
148
<ValidExample>
141
149
142
150
The most unique identifying information first represented by the activity name and its sub-page, then followed by broader identifiers such as the course name and the site name.
143
151
144
-
`Kinetics problem set 1: Submit assignment | Physics 101 | Moodle University`
152
+
`Kinetics problem set 1: Submit assignment | Physics 101 | Mount Orange School`
145
153
146
154
</ValidExample>
147
155
148
156
<ValidExample>
149
157
150
-
The most unique identifying information first represented by sub-page's name followed by the activity name that the page belongs to, then followed by broader identifiers such as the course name and the site name.
158
+
The most unique identifying information first represented by the name of the sub-page, followed by the activity name that the page belongs to, then followed by broader identifiers such as the course name and the site name.
151
159
152
-
`Submit assignment | Kinetics problem set 1 | Physics 101 | Moodle University`
160
+
`Submit assignment | Kinetics problem set 1 | Physics 101 | Mount Orange School`
153
161
154
162
</ValidExample>
155
163
156
164
#### Separating components of a page title
157
165
158
-
When separating the components of the page tile, please use the `moodle_page:TITLE_SEPARATOR` constant.
166
+
When separating the components of the page tile, please use the `moodle_page::TITLE_SEPARATOR` constant.
There's no need to add the site's name when setting the page title using `$PAGE->set_title()`. The site name is automatically appended at the end of the page title by default by `$PAGE->set_title()`. The displayed site name on the page title will depend on the admin setting `$CFG->sitenameintitle` whether it's set to show the site's full name or the site's short name.
184
+
You should not add the name of the site when setting the page title using `$PAGE->set_title()`. The site name is automatically appended to the end of the page title in the correct format when using `$PAGE->set_title()`.
185
+
186
+
:::info
187
+
188
+
Administrators can use the `sitenameinititle` configuration setting to configure how this is shown in the title with possible options including:
189
+
190
+
- the _full name_ of the site, for example, "Mount Orange School"
191
+
- the _short name_ of the site, for example: "MOS"
192
+
193
+
This is automatically handled by `$PAGE->set_title()`.
0 commit comments