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
As is already the case with many sections, there are macros that allow you to link to pages relating to direct resources, such as HTML elements or global JavaScript objects. The ARIA section is more recent and does not have macros for editors to call Roles and Attributes.
To enable pages to access resources from the ARIA section, the idea would be to create two macros that work in the same way as HTMLElement or DOMxRef (as preferred) to link ARIA Roles and ARIA Attributes pages instead of using links.
This offers various advantages: the text is shorter than with a Markdown link; in the event of a structural change, only the macro file on Rari needs to be modified; and it allows for abbreviated syntax, similar to HTMLElement, which does not require us to write the angle brackets (for example).
{{ARIAAttr("aria-autocomplete", "autocomplete", "#example")}}
→ … [`example of the autocomplete ARIA attribute`](/<locale>/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-autocomplete#example)
{{ARIAAttr("aria-autocomplete", "autocomplete", "#example", 1)}}
→ … [example of the autocomplete ARIA attribute](/<locale>/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-autocomplete#example)
Note
The structural_roles page cannot be called by the macro unless a condition is added specifically for it, as it is still located within the category.
Objectives
At first, this could replace the current linking format for these resources and enable the linking of these pages to be extended across various resources, such as HTML — which is closely tied to these attributes and roles — as well as HTML APIs and the various "See also" sections that could incorporate these resources. For the @mdn/content-team and the content they write/proofread.
Subsequently, the translated pages could incorporate these changes and benefit from the functionality offered by these macros to reduce link-writing errors and provide auto-generated links.
For both repositories, this will reduce the workload on the tools that manage link changes, as they will no longer need to correct capitalisation, redirects, and link functionality, since the macro itself will be able to determine whether it is functional thanks to the PR linter.
Which form
These forms are likely to be the ones that best correspond to what already exists, but it is possible to consider different forms if necessary. Furthermore, using common forms makes it easier to get used to a format that is already familiar and to grasp how to use it.
The idea
As is already the case with many sections, there are macros that allow you to link to pages relating to direct resources, such as HTML elements or global JavaScript objects. The ARIA section is more recent and does not have macros for editors to call Roles and Attributes.
To enable pages to access resources from the ARIA section, the idea would be to create two macros that work in the same way as HTMLElement or DOMxRef (as preferred) to link ARIA Roles and ARIA Attributes pages instead of using links.
This offers various advantages: the text is shorter than with a Markdown link; in the event of a structural change, only the macro file on Rari needs to be modified; and it allows for abbreviated syntax, similar to HTMLElement, which does not require us to write the angle brackets (for example).
Some example
/<locale>/docs/Web/Accessibility/ARIA/Reference/Roles/{$arg_0}_role/<locale>/docs/Web/Accessibility/ARIA/Reference/Attributes/{$arg_0}- Page name
- Custom name
- Page anchor
{{ARIARole("alert")}} → [`alert`](/<locale>/docs/Web/Accessibility/ARIA/Reference/Roles/alert_role){{ARIARole("alert", "an alert")}} → … [an alert](/<locale>/docs/Web/Accessibility/ARIA/Reference/Roles/alert_role)"{{ARIARole("alert", "an alert", "#examples")}} → [an alert](/<locale>/docs/Web/Accessibility/ARIA/Reference/Roles/alert_role#examples){{ARIAAttr("aria-autocomplete")}} → [`aria-autocomplete`](/<locale>/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-autocomplete){{ARIAAttr("aria-autocomplete", "autocomplete")}} → … [autocomplete](/<locale>/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-autocomplete)"{{ARIAAttr("aria-autocomplete", "autocomplete", "#example")}} → … [example of the autocomplete ARIA attribute](/<locale>/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-autocomplete#example)- Page name
- Custom name
- Page anchor
- Disable code
{{ARIARole("alert")}} → [`alert`](/<locale>/docs/Web/Accessibility/ARIA/Reference/Roles/alert_role){{ARIARole("alert", "an alert")}} → … [`an alert`](/<locale>/docs/Web/Accessibility/ARIA/Reference/Roles/alert_role)"{{ARIARole("alert", "an alert", "#examples")}} → [`an alert`](/<locale>/docs/Web/Accessibility/ARIA/Reference/Roles/alert_role#examples){{ARIARole("alert", "an alert", "#examples", 1)}} → [an alert](/<locale>/docs/Web/Accessibility/ARIA/Reference/Roles/alert_role#examples){{ARIAAttr("aria-autocomplete")}} → [`aria-autocomplete`](/<locale>/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-autocomplete){{ARIAAttr("aria-autocomplete", "autocomplete")}} → … [`autocomplete`](/<locale>/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-autocomplete)"{{ARIAAttr("aria-autocomplete", "autocomplete", "#example")}} → … [`example of the autocomplete ARIA attribute`](/<locale>/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-autocomplete#example){{ARIAAttr("aria-autocomplete", "autocomplete", "#example", 1)}} → … [example of the autocomplete ARIA attribute](/<locale>/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-autocomplete#example)Note
The
structural_rolespage cannot be called by the macro unless a condition is added specifically for it, as it is still located within the category.Objectives
At first, this could replace the current linking format for these resources and enable the linking of these pages to be extended across various resources, such as HTML — which is closely tied to these attributes and roles — as well as HTML APIs and the various "See also" sections that could incorporate these resources. For the @mdn/content-team and the content they write/proofread.
Subsequently, the translated pages could incorporate these changes and benefit from the functionality offered by these macros to reduce link-writing errors and provide auto-generated links.
For both repositories, this will reduce the workload on the tools that manage link changes, as they will no longer need to correct capitalisation, redirects, and link functionality, since the macro itself will be able to determine whether it is functional thanks to the PR linter.
Which form
These forms are likely to be the ones that best correspond to what already exists, but it is possible to consider different forms if necessary. Furthermore, using common forms makes it easier to get used to a format that is already familiar and to grasp how to use it.
Roles
{{ARIARole}}(Like SVGElement)Attributs
{{ARIAAttr}}(Like SVGAttr)