@markuplint/html-spec 3.7.0 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.json CHANGED
@@ -1948,7 +1948,7 @@
1948
1948
  },
1949
1949
  {
1950
1950
  "name": "article",
1951
- "description": "A section of a page that consists of a composition that forms an independent part of a document, page, or site.\n\nAn article is not a navigational landmark, but can be nested to form a discussion where assistive technologies could pay attention to article nesting to assist the user in following the discussion. An article could be a forum post, a magazine or newspaper article, a web log entry, a user-submitted comment, or any other independent item of content. It is independent in that its contents could stand alone, for example in syndication. However, the element is still associated with its ancestors; for instance, contact information that applies to a parent body element still covers the article as well. When nesting articles, the child articles represent content that is related to the content of the parent article. For instance, a web log entry on a site that accepts user-submitted comments could represent the comments as articles nested within the article for the web log entry. Author, heading, date, or other information associated with an article does not apply to nested articles.\n\nWhen the user navigates to an element assigned the role of article, assistive technologies that typically intercept standard keyboard events SHOULD switch to document browsing mode, as opposed to passing keyboard events through to the web application. Assistive technologies MAY provide a feature allowing the user to navigate the hierarchy of any nested article elements.\n\nWhen an article is in the context of a feed, the author MAY specify values for aria-posinset and aria-setsize.",
1951
+ "description": "A section of a page that consists of a composition that forms an independent part of a document, page, or site.\n\nAn article is not a navigational landmark, but can be nested to form a discussion where assistive technologies could pay attention to article nesting to assist the user in following the discussion. An article could be a forum post, a magazine or newspaper article, a web log entry, a user-submitted comment, or any other independent item of content. It is independent in that its contents could stand alone, for example in syndication. However, the element is still associated with its ancestors; for instance, contact information that applies to a parent body element still covers the article as well. When nesting articles, the child articles represent content that is related to the content of the parent article. For instance, a web log entry on a site that accepts user-submitted comments could represent the comments as articles nested within the article for the web log entry. Author, heading, date, or other information associated with an article does not apply to nested articles.\n\nWhen the user navigates to an element assigned the role of article, assistive technologies that typically intercept standard keyboard events SHOULD switch to document browsing mode, as opposed to passing keyboard events through to the web application. Some assistive technologies provide a feature allowing the user to navigate the hierarchy of any nested article elements.\n\nWhen an article is in the context of a feed, the author MAY specify values for aria-posinset and aria-setsize.",
1952
1952
  "generalization": ["document"],
1953
1953
  "requiredContextRole": [],
1954
1954
  "requiredOwnedElements": [],
@@ -4986,7 +4986,7 @@
4986
4986
  },
4987
4987
  {
4988
4988
  "name": "form",
4989
- "description": "A landmark region that contains a collection of items and objects that, as a whole, combine to create a form. See related search.\n\nA form can contain a mix of host language form controls, scripted controls, and hyperlinks. Authors are reminded to use native host language semantics to create form controls whenever possible. If the purpose of a form is to submit search criteria, authors SHOULD use the search role instead of the generic form role.\n\nAuthors MUST give each element with role form a brief label that describes the purpose of the form. Authors SHOULD reference a visible label with aria-labelledby if a visible label is present. Authors SHOULD include the label inside of a heading whenever possible. The heading MAY be an instance of the standard host language heading element or an instance of an element with role heading.\n\nIf an author uses a script to submit a form based on a user action that would otherwise not trigger an onsubmit event (for example, a form submission triggered by the user changing a form element's value), the author SHOULD provide the user with advance notification of the behavior.\n\nAssistive technologies SHOULD enable users to quickly navigate to elements with role form. User agents SHOULD treat elements with role form and have an accessible name as navigational landmarks. User agents MAY enable users to quickly navigate to elements with role form.",
4989
+ "description": "A landmark region that contains a collection of items and objects that, as a whole, combine to create a form. See related search.\n\nA form can contain a mix of host language form controls, scripted controls, and hyperlinks. Authors are reminded to use native host language semantics to create form controls whenever possible. If the purpose of a form is to submit search criteria, authors SHOULD use the search role instead of the generic form role.\n\nAuthors MUST give each element with role form a brief label that describes the purpose of the form. Authors SHOULD reference a visible label with aria-labelledby if a visible label is present. Authors SHOULD include the label inside of a heading whenever possible. The heading MAY be an instance of the standard host language heading element or an instance of an element with role heading.\n\nIf an author uses a script to submit a form based on a user action that would otherwise not trigger an onsubmit event (for example, a form submission triggered by the user changing a form element's value), the author SHOULD provide the user with advance notification of the behavior.\n\nAssistive technologies SHOULD enable users to quickly navigate to elements with role form. User agents SHOULD treat elements with role form and an accessible name as navigational landmarks. User agents MAY enable users to quickly navigate to elements with role form.",
4990
4990
  "generalization": ["landmark"],
4991
4991
  "requiredContextRole": [],
4992
4992
  "requiredOwnedElements": [],
@@ -5206,7 +5206,7 @@
5206
5206
  "description": "A composite widget containing a collection of one or more rows with one or more cells where some or all cells in the grid are focusable by using methods of two-dimensional navigation, such as directional arrow keys.\n\nThe grid role does not imply a specific visual, e.g., tabular, presentation. It describes relationships among elements. It can be used for purposes as simple as grouping a collection of checkboxes or navigation links or as complex as creating a full-featured spreadsheet application.\n\nThe cell elements of a grid have role gridcell. Authors MAY designate a cell as a row or column header by using either the rowheader or columnheader role in lieu of the gridcell role. Authors MUST ensure elements with role gridcell, columnheader, or rowheader are owned by elements with role row, which are in turn owned by an element with role rowgroup, or grid.\n\nTo be keyboard accessible, authors SHOULD manage focus of descendants of a grid as described in Managing Focus. When a user is navigating the grid content with a keyboard, authors SHOULD set focus as follows:\n\nAuthors SHOULD provide a mechanism for changing to an interaction or edit mode that allows users to navigate and interact with content contained inside a focusable cell if that focusable cell contains any of the following:\n\nFor example, if a cell in a spreadsheet contains a combobox or editable text, the Enter key might be used to activate a cell interaction or editing mode when that cell has focus so the directional arrow keys can be used to operate the contained combobox or textbox. Depending on the implementation, pressing Enter again, Tab, Escape, or another key might switch the application back to the grid navigation mode.\n\nAuthors MAY use a gridcell to display the result of a formula, which could be editable by the user. In a spreadsheet application, for example, a gridcell might show a value calculated from a formula until the user activates the gridcell for editing when a textbox appears in the gridcell containing the formula in an editable state.\n\nIf aria-readonly is set on an element with role grid, user agents MUST propagate the value to all gridcell elements owned by the grid and expose the value in the accessibility API. An author MAY override the propagated value of aria-readonly for an individual gridcell element.\n\nIn a grid that provides cell content editing functions, if the content of a focusable gridcell element is not editable, authors MAY set aria-readonly to true on the gridcell element. However, the value of aria-readonly, whether specified for a grid or individual cells, only indicates whether the content contained in cells is editable. It does not represent availability of functions for navigating or manipulating the grid itself.\n\nAn unspecified value for aria-readonly does not imply that a grid or a gridcell contains editable content. For example, if a grid presents a collection of elements that are not editable, such as a collection of link elements representing dates in a datepicker, it is not necessary for the author to specify a value for aria-readonly.\n\nAuthors MAY indicate that a focusable gridcell is selectable as the object of an action with the aria-selected attribute. If the grid allows multiple gridcells to be selected, the author SHOULD set aria-multiselectable to true on the element with role grid.\n\nSince WAI-ARIA can augment an element of the host language, a grid can reuse the elements and attributes of a native table, such as an HTML table element. For example, if an author applies the grid role to an HTML table element, the author does not need to apply the row and gridcell roles to the descendant HTML tr and td elements because the user agent will automatically make the appropriate translations. When the author is reusing a native host language table element and needs a gridcell element to span multiple rows or columns, the author SHOULD apply the appropriate host language attributes instead of WAI-ARIA aria-rowspan or aria-colspan properties.\n\nSee the WAI-ARIA Authoring Practices for additional details on implementing grid design patterns.",
5207
5207
  "generalization": ["composite", "table"],
5208
5208
  "requiredContextRole": [],
5209
- "requiredOwnedElements": ["row", "rowgroup > row"],
5209
+ "requiredOwnedElements": ["caption", "row", "rowgroup > row"],
5210
5210
  "accessibleNameRequired": true,
5211
5211
  "accessibleNameFromAuthor": true,
5212
5212
  "accessibleNameFromContent": false,
@@ -7218,7 +7218,8 @@
7218
7218
  "group > menuitemcheckbox",
7219
7219
  "menuitem",
7220
7220
  "menuitemcheckbox",
7221
- "menuitemradio"
7221
+ "menuitemradio",
7222
+ "separator"
7222
7223
  ],
7223
7224
  "accessibleNameRequired": false,
7224
7225
  "accessibleNameFromAuthor": true,
@@ -7346,7 +7347,8 @@
7346
7347
  "group > menuitemcheckbox",
7347
7348
  "menuitem",
7348
7349
  "menuitemcheckbox",
7349
- "menuitemradio"
7350
+ "menuitemradio",
7351
+ "separator"
7350
7352
  ],
7351
7353
  "accessibleNameRequired": false,
7352
7354
  "accessibleNameFromAuthor": true,
@@ -7842,7 +7844,7 @@
7842
7844
  },
7843
7845
  {
7844
7846
  "name": "meter",
7845
- "description": "An element that represents a scalar measurement within a known range, or a fractional value. See related progressbar.\n\nAuthors MAY set aria-valuemin and aria-valuemax to indicate the minimum and maximum values for the meter. Otherwise, their implicit values follow the same rules as <input[type=\"range\"]> in [HTML]:\n\nThe value of aria-valuenow MUST NOT fall below or exceed the computed values of aria-valuemin and aria-valuemax, respectively.\n\nAuthors SHOULD NOT use the meter role to indicate progress; the progressbar role exists to address that need.\n\nPresently, there are no WAI-ARIA properties corresponding to the low, optimum, and high attributes supported on the <meter> element in [HTML]. The addition of these properties will be considered for ARIA version 1.3.",
7847
+ "description": "An element that represents a scalar measurement within a known range, or a fractional value. See related progressbar.\n\nAuthors MAY set aria-valuemin and aria-valuemax to indicate the minimum and maximum values for the meter. Otherwise, their implicit values follow the same rules as <input type=\"range\"> in HTML:\n\nThe value of aria-valuenow MUST NOT fall below or exceed the computed values of aria-valuemin and aria-valuemax, respectively.\n\nAuthors SHOULD NOT use the meter role to indicate progress; the progressbar role exists to address that need.\n\nPresently, there are no WAI-ARIA properties corresponding to the low, optimum, and high attributes supported on the <meter> element in HTML. The addition of these properties will be considered for ARIA version 1.3.",
7846
7848
  "generalization": ["range"],
7847
7849
  "requiredContextRole": [],
7848
7850
  "requiredOwnedElements": [],
@@ -8539,7 +8541,7 @@
8539
8541
  },
8540
8542
  {
8541
8543
  "name": "presentation",
8542
- "description": "An element whose implicit native role semantics will not be mapped to the accessibility API. See synonym none.\n\nIn ARIA 1.1, the working group introduced none as a synonym to the presentation role, due to author confusion surrounding the intended meaning of the word \"presentation\" or \"presentational.\" Many individuals erroneously consider role=\"presentation\" to be synonymous with aria-hidden=\"true\", and we believe role=\"none\" conveys the actual meaning more unambiguously.\n\nThe intended use is when an element is used to change the look of the page but does not have all the functional, interactive, or structural relevance implied by the element type, or can be used to provide for an accessible fallback in older browsers that do not support WAI-ARIA.\n\nExample use cases:\n\nFor any element with a role of presentation and which is not focusable, the user agent MUST NOT expose the implicit native semantics of the element (the role and its states and properties) to accessibility APIs. However, the user agent MUST expose content and descendant elements that do not have an explicit or inherited role of presentation. Thus, the presentation role causes a given element to be treated as having no role or to be removed from the accessibility tree, but does not cause the content contained within the element to be removed from the accessibility tree.\n\nFor example, the following two markup snippets will be exposed similarly to an accessibility API.\n\nIn HTML, the <img> element is treated as a single entity regardless of the type of image file. Consequently, using role=\"presentation\" or role=\"none\" on an HTML img is equivalent to using aria-hidden=\"true\". In order to make the image contents accessible, authors can embed the object using an <object> or <iframe> element, or use inline SVG code, and follow the accessibility guidelines for the image content.\n\nAuthors SHOULD NOT provide meaningful alternative text (for example, use alt=\"\" in HTML) when the presentation role is applied to an image.\n\nIn the following code sample, the containing img and is appropriately labeled by the caption paragraph. In this example the img element can be marked as presentation because the role and the text alternatives are provided by the containing element.\n\nIn the following code sample, because the anchor (HTML a element) is acting as the treeitem, the list item (HTML li element) is assigned an explicit WAI-ARIA role of presentation to override the user agent's implicit native semantics for list items.\n\nThe presentation role is used on an element that has implicit native semantics, meaning that there is a default accessibility API role for the element. Some elements are only complete when additional descendant elements are provided. For example, in HTML, table elements (matching the table role) require tr descendants (which have an implicit row role), which in turn require th or td children (the columnheader or rowheader and cell roles, respectively). Similarly, lists require list item children. The descendant elements that complete the semantics of an element are described in WAI-ARIA as required owned elements.\n\nWhen an explicit or inherited role of presentation is applied to an element with the implicit semantic of a WAI-ARIA role that has required owned elements, in addition to the element with the explicit role of presentation, the user agent MUST apply an inherited role of presentation to any owned elements that do not have an explicit role defined. Also, when an explicit or inherited role of presentation is applied to a host language element which has required children as defined by the host language specification, in addition to the element with the explicit role of presentation, the user agent MUST apply an inherited role of presentation to any required children that do not have an explicit role defined.\n\nFor any element with an explicit or inherited role of presentation and which is not focusable, user agents MUST ignore role-specific WAI-ARIA states and properties for that element. For example, in HTML, a ul or ol element with a role of presentation will have the implicit native semantics of its li elements removed because the list role to which the ul or ol corresponds has a required owned element of listitem. Likewise, the implicit native semantics of an HTML table element's thead/tbody/tfoot/tr/th/td descendants will also be removed, because the HTML specification indicates that these are required structural descendants of the table element.\n\nOnly the implicit native semantics of elements that correspond to WAI-ARIA required owned elements are removed. All other content remains intact, including nested tables or lists, unless those elements also have an explicit role of presentation specified.\n\nFor example, according to an accessibility API, the following markup elements would appear to have identical role semantics (no roles) and identical content.\n\nThere are other WAI-ARIA roles with required children for which this situation is applicable (e.g., radiogroups and listboxes), but tables and lists are the most common real-world cases in which the presentation inheritance is likely to apply.\n\nFor any element with an explicit or inherited role of presentation, user agents MUST apply an inherited role of presentation to all host-language-specific labeling elements for the presentational element. For example, a table element with a role of presentation will have the implicit native semantics of its caption element removed, because the caption is merely a label for the presentational table.\n\nInformation about resolving conflicts in the presentation role has been moved to Handling Author Errors",
8544
+ "description": "An element whose implicit native role semantics will not be mapped to the accessibility API. See synonym none.\n\nIn ARIA 1.1, the working group introduced none as a synonym to the presentation role, due to author confusion surrounding the intended meaning of the word \"presentation\" or \"presentational.\" Many individuals erroneously consider role=\"presentation\" to be synonymous with aria-hidden=\"true\", and we believe role=\"none\" conveys the actual meaning more unambiguously.\n\nThe intended use is when an element is used to change the look of the page but does not have all the functional, interactive, or structural relevance implied by the element type, or can be used to provide for an accessible fallback in older browsers that do not support WAI-ARIA.\n\nExample use cases:\n\nFor any element with a role of presentation and which is not focusable, the user agent MUST NOT expose the implicit native semantics of the element (the role and its states and properties) to accessibility APIs. However, the user agent MUST expose content and descendant elements that do not have an explicit or inherited role of presentation. Thus, the presentation role causes a given element to be treated as having no role or to be removed from the accessibility tree, but does not cause the content contained within the element to be removed from the accessibility tree.\n\nFor example, the following two markup snippets will be exposed similarly to an accessibility API.\n\nIn HTML, the <img> element is treated as a single entity regardless of the type of image file. Consequently, using role=\"presentation\" or role=\"none\" on an HTML img is equivalent to using aria-hidden=\"true\". In order to make the image contents accessible, authors can embed the object using an <object> or <iframe> element, or use inline SVG code, and follow the accessibility guidelines for the image content.\n\nAuthors SHOULD NOT provide meaningful alternative text (for example, use alt=\"\" in HTML) when the presentation role is applied to an image.\n\nIn the following code sample, the containing img and is appropriately labeled by the caption paragraph. In this example the img element can be marked as presentation because the role and the text alternatives are provided by the containing element.\n\nIn the following code sample, because the anchor (HTML a element) is acting as the treeitem, the list item (HTML li element) is assigned an explicit WAI-ARIA role of presentation to override the user agent's implicit native semantics for list items.\n\nThe presentation role is used on an element that has implicit native semantics, meaning that there is a default accessibility API role for the element. Some elements are only complete when additional descendant elements are provided. For example, in HTML, table elements (matching the table role) require tr descendants (which have an implicit row role), which in turn require th or td children (the columnheader or rowheader and cell roles, respectively). Similarly, lists require list item children. The descendant elements that complete the semantics of an element are described in WAI-ARIA as Allowed Accessibility Child Roles.\n\nWhen an explicit or inherited role of presentation is applied to an element with the implicit semantic of a WAI-ARIA role that has Allowed Accessibility Child Roles, in addition to the element with the explicit role of presentation, the user agent MUST apply an inherited role of presentation to any owned elements that do not have an explicit role defined. Also, when an explicit or inherited role of presentation is applied to a host language element which has specifically allowed children as defined by the host language specification, in addition to the element with the explicit role of presentation, the user agent MUST apply an inherited role of presentation to any specifically allowed children that do not have an explicit role defined.\n\nFor any element with an explicit or inherited role of presentation and which is not focusable, user agents MUST ignore role-specific WAI-ARIA states and properties for that element. For example, in HTML, a ul or ol element with a role of presentation will have the implicit native semantics of its li elements removed because the list role to which the ul or ol corresponds has an Allowed Accessibility Child Role of listitem. Likewise, the implicit native semantics of an HTML table element's thead/tbody/tfoot/tr/th/td descendants will also be removed, because the HTML specification indicates that these are required structural descendants of the table element.\n\nOnly the implicit native semantics of elements that correspond to WAI-ARIA Allowed Accessibility Child Roles are removed. All other content remains intact, including nested tables or lists, unless those elements also have an explicit role of presentation specified.\n\nFor example, according to an accessibility API, the following markup elements would appear to have identical role semantics (no roles) and identical content.\n\nThere are other WAI-ARIA roles with specific allowed children for which this situation is applicable (e.g., feeds and listboxes), but tables and lists are the most common real-world cases in which the presentation inheritance is likely to apply.\n\nFor any element with an explicit or inherited role of presentation, user agents MUST apply an inherited role of presentation to all host-language-specific labeling elements for the presentational element. For example, a table element with a role of presentation will have the implicit native semantics of its caption element removed, because the caption is merely a label for the presentational table.\n\nInformation about resolving conflicts in the presentation role has been moved to Handling Author Errors",
8543
8545
  "generalization": ["structure"],
8544
8546
  "requiredContextRole": [],
8545
8547
  "requiredOwnedElements": [],
@@ -8645,7 +8647,7 @@
8645
8647
  },
8646
8648
  {
8647
8649
  "name": "progressbar",
8648
- "description": "An element that displays the progress status for tasks that take a long time.\n\nA progressbar indicates that the user's request has been received and the application is making progress toward completing the requested action.\n\nAuthors MAY set aria-valuemin and aria-valuemax to indicate the minimum and maximum progress indicator values. Otherwise, their implicit values follow the same rules as <input[type=\"range\"]> in [HTML]:\n\n\n\nThe author SHOULD supply a value for aria-valuenow unless the value is indeterminate, in which case the author SHOULD omit the aria-valuenow attribute. Authors SHOULD update this value when the visual progress indicator is updated. If the progressbar is describing the loading progress of a particular region of a page, authors SHOULD both use aria-describedby to reference the progressbar status, and set the aria-busy attribute to true on the region until it is finished loading. It is not possible for the user to alter the value of a progressbar because it is always read-only.\n\nAssistive technologies generally will render the value of aria-valuenow as a percent of a range between the value of aria-valuemin and aria-valuemax, unless aria-valuetext is specified.",
8650
+ "description": "An element that displays the progress status for tasks that take a long time.\n\nA progressbar indicates that the user's request has been received and the application is making progress toward completing the requested action.\n\nAuthors MAY set aria-valuemin and aria-valuemax to indicate the minimum and maximum progress indicator values. Otherwise, their implicit values follow the same rules as <input type=\"range\"> in HTML:\n\n\n\nThe author SHOULD supply a value for aria-valuenow unless the value is indeterminate, in which case the author SHOULD omit the aria-valuenow attribute. Authors SHOULD update this value when the visual progress indicator is updated. If the progressbar is describing the loading progress of a particular region of a page, authors SHOULD both use aria-describedby to reference the progressbar status, and set the aria-busy attribute to true on the region until it is finished loading. It is not possible for the user to alter the value of a progressbar because it is always read-only.\n\nAssistive technologies generally will render the value of aria-valuenow as a percent of a range between the value of aria-valuemin and aria-valuemax, unless aria-valuetext is specified.",
8649
8651
  "generalization": ["range", "widget"],
8650
8652
  "requiredContextRole": [],
8651
8653
  "requiredOwnedElements": [],
@@ -8903,7 +8905,7 @@
8903
8905
  "description": "A group of radio buttons.\n\nA radiogroup is a type of select list that can only have a single entry checked at any one time. Authors SHOULD enforce that only one radio button in a group can be checked at the same time. When one item in the group is checked, the previously checked item becomes unchecked (its aria-checked attribute becomes false).",
8904
8906
  "generalization": ["select"],
8905
8907
  "requiredContextRole": [],
8906
- "requiredOwnedElements": ["radio"],
8908
+ "requiredOwnedElements": [],
8907
8909
  "accessibleNameRequired": true,
8908
8910
  "accessibleNameFromAuthor": true,
8909
8911
  "accessibleNameFromContent": false,
@@ -9150,7 +9152,7 @@
9150
9152
  },
9151
9153
  {
9152
9154
  "name": "region",
9153
- "description": "A landmark containing content that is relevant to a specific, author-specified purpose and sufficiently important that users will likely want to be able to navigate to the section easily and to have it listed in a summary of the page. Such a page summary could be generated dynamically by a user agent or assistive technology.\n\nAuthors SHOULD limit use of the region role to sections containing content with a purpose that is not accurately described by one of the other landmark roles, such as main, complementary, or navigation.\n\nAuthors MUST give each element with role region a brief label that describes the purpose of the content in the region. Authors SHOULD reference a visible label with aria-labelledby if a visible label is present. Authors SHOULD include the label inside of a heading whenever possible. The heading MAY be an instance of the standard host language heading element or an instance of an element with role heading.\n\nAssistive technologies SHOULD enable users to quickly navigate to elements with role region. User agents SHOULD treat elements with role region and have an accessible name as navigational landmarks. User agents MAY enable users to quickly navigate to elements with role region.",
9155
+ "description": "A landmark containing content that is relevant to a specific, author-specified purpose and sufficiently important that users will likely want to be able to navigate to the section easily and to have it listed in a summary of the page. Such a page summary could be generated dynamically by a user agent or assistive technology.\n\nAuthors SHOULD limit use of the region role to sections containing content with a purpose that is not accurately described by one of the other landmark roles, such as main, complementary, or navigation.\n\nAuthors MUST give each element with role region a brief label that describes the purpose of the content in the region. Authors SHOULD reference a visible label with aria-labelledby if a visible label is present. Authors SHOULD include the label inside of a heading whenever possible. The heading MAY be an instance of the standard host language heading element or an instance of an element with role heading.\n\nAssistive technologies SHOULD enable users to quickly navigate to elements with role region. User agents SHOULD treat elements with role region and an accessible name as navigational landmarks. User agents MAY enable users to quickly navigate to elements with role region.",
9154
9156
  "generalization": ["landmark"],
9155
9157
  "requiredContextRole": [],
9156
9158
  "requiredOwnedElements": [],
@@ -9769,7 +9771,7 @@
9769
9771
  },
9770
9772
  {
9771
9773
  "name": "scrollbar",
9772
- "description": "A graphical object that controls the scrolling of content within a viewing area, regardless of whether the content is fully displayed within the viewing area.\n\nA scrollbar represents the current value and range of possible values via the size of the scrollbar and position of the thumb with respect to the visible range of the orientation (horizontal or vertical) it controls. Its orientation represents the orientation of the scrollbar and the scrolling effect on the viewing area controlled by the scrollbar. It is typically possible to add to or subtract from the current value by using directional keys such as arrow keys.\n\nAuthors MUST set the aria-controls attribute on the scrollbar element to reference the scrollable area it controls.\n\nAuthors MAY set aria-valuemin and aria-valuemax to indicate the minimum and maximum thumb position. Otherwise, their implicit values follow the same rules as <input[type=\"range\"]> in [HTML]:\n\nAuthors MUST set the aria-valuenow attribute to indicate the current thumb position. If aria-valuenow is missing or has an unexpected value, browsers MAY implement the repair techniques specified in the section describing handling author errors in states and properties, which are equivalent to the repair techniques for <input[type=\"range\"]> in [HTML].\n\nElements with the role scrollbar have an implicit aria-orientation value of vertical.\n\nAssistive technologies generally will render the value of aria-valuenow as a percent of a range between the value of aria-valuemin and aria-valuemax, unless aria-valuetext is specified. It is best to set the values for aria-valuemin, aria-valuemax, and aria-valuenow in a manner that is appropriate for this calculation.",
9774
+ "description": "A graphical object that controls the scrolling of content within a viewing area, regardless of whether the content is fully displayed within the viewing area.\n\nA scrollbar represents the current value and range of possible values via the size of the scrollbar and position of the thumb with respect to the visible range of the orientation (horizontal or vertical) it controls. Its orientation represents the orientation of the scrollbar and the scrolling effect on the viewing area controlled by the scrollbar. It is typically possible to add to or subtract from the current value by using directional keys such as arrow keys.\n\nAuthors MUST set the aria-controls attribute on the scrollbar element to reference the scrollable area it controls.\n\nAuthors MAY set aria-valuemin and aria-valuemax to indicate the minimum and maximum thumb position. Otherwise, their implicit values follow the same rules as <input type=\"range\"> in HTML:\n\nAuthors MUST set the aria-valuenow attribute to indicate the current thumb position. If aria-valuenow is missing or has an unexpected value, browsers MAY implement the repair techniques specified in the section describing handling author errors in states and properties, which are equivalent to the repair techniques for <input type=\"range\"> in HTML.\n\nElements with the role scrollbar have an implicit aria-orientation value of vertical.\n\nAssistive technologies generally will render the value of aria-valuenow as a percent of a range between the value of aria-valuemin and aria-valuemax, unless aria-valuetext is specified. It is best to set the values for aria-valuemin, aria-valuemax, and aria-valuenow in a manner that is appropriate for this calculation.",
9773
9775
  "generalization": ["range", "widget"],
9774
9776
  "requiredContextRole": [],
9775
9777
  "requiredOwnedElements": [],
@@ -10627,7 +10629,7 @@
10627
10629
  },
10628
10630
  {
10629
10631
  "name": "slider",
10630
- "description": "An input where the user selects a value from within a given range.\n\nA slider represents the current value and range of possible values via the size of the slider and position of the thumb. It is typically possible to add to or subtract from the current value by using directional keys such as arrow keys.\n\nAuthors MAY set the aria-valuemin and aria-valuemax attributes. Otherwise, their implicit values follow the same rules as <input[type=\"range\"]> in [HTML]:\n\nAuthors MUST set the aria-valuenow attribute. If aria-valuenow is missing or has an unexpected value, browsers MAY implement the repair techniques specified in the section describing handling author errors in states and properties, which are equivalent to the repair techniques for <input[type=\"range\"]> in [HTML].\n\nElements with the role slider have an implicit aria-orientation value of horizontal.",
10632
+ "description": "An input where the user selects a value from within a given range.\n\nA slider represents the current value and range of possible values via the size of the slider and position of the thumb. It is typically possible to add to or subtract from the current value by using directional keys such as arrow keys.\n\nAuthors MAY set the aria-valuemin and aria-valuemax attributes. Otherwise, their implicit values follow the same rules as <input type=\"range\"> in HTML:\n\nAuthors MUST set the aria-valuenow attribute. If aria-valuenow is missing or has an unexpected value, browsers MAY implement the repair techniques specified in the section describing handling author errors in states and properties, which are equivalent to the repair techniques for <input type=\"range\"> in HTML.\n\nElements with the role slider have an implicit aria-orientation value of horizontal.",
10631
10633
  "generalization": ["input", "range"],
10632
10634
  "requiredContextRole": [],
10633
10635
  "requiredOwnedElements": [],
@@ -11790,10 +11792,10 @@
11790
11792
  },
11791
11793
  {
11792
11794
  "name": "table",
11793
- "description": "A section containing data arranged in rows and columns. See related grid.\n\nThe table role is intended for tabular containers which are not interactive. If the tabular container maintains a selection state, provides its own two-dimensional navigation, or allows the user to rearrange or otherwise manipulate its contents or the display thereof, authors SHOULD use grid or treegrid instead.\n\nAuthors SHOULD prefer the use of the host language's semantics for table whenever possible, such as the <table> element in [HTML].",
11795
+ "description": "A section containing data arranged in rows and columns. See related grid.\n\nThe table role is intended for tabular containers which are not interactive. If the tabular container maintains a selection state, provides its own two-dimensional navigation, or allows the user to rearrange or otherwise manipulate its contents or the display thereof, authors SHOULD use grid or treegrid instead.\n\nAuthors SHOULD prefer the use of the host language's semantics for table whenever possible, such as the <table> element in HTML.",
11794
11796
  "generalization": ["section"],
11795
11797
  "requiredContextRole": [],
11796
- "requiredOwnedElements": ["row", "rowgroup > row"],
11798
+ "requiredOwnedElements": ["caption", "row", "rowgroup > row"],
11797
11799
  "accessibleNameRequired": true,
11798
11800
  "accessibleNameFromAuthor": true,
11799
11801
  "accessibleNameFromContent": false,
@@ -12378,7 +12380,7 @@
12378
12380
  },
12379
12381
  {
12380
12382
  "name": "time",
12381
- "description": "An element that represents a specific point in time.\n\nAt the present time, there are no WAI-ARIA properties corresponding to the datetime attribute supported on <time> in [HTML]. The addition of this property will be considered for ARIA version 1.3.\n\nAuthors SHOULD limit text contents to a valid date- or time-related string, or apply this future datetime-equivalent property to the element which has role time.\n\nExamples of valid date- or time-related strings as text contents of an element with the time role:",
12383
+ "description": "An element that represents a specific point in time.\n\nAt the present time, there are no WAI-ARIA properties corresponding to the datetime attribute supported on <time> in HTML. The addition of this property will be considered for ARIA version 1.3.\n\nAuthors SHOULD limit text contents to a valid date- or time-related string, or apply this future datetime-equivalent property to the element which has role time.\n\nExamples of valid date- or time-related strings as text contents of an element with the time role:",
12382
12384
  "generalization": ["section"],
12383
12385
  "requiredContextRole": [],
12384
12386
  "requiredOwnedElements": [],
@@ -12958,7 +12960,7 @@
12958
12960
  "description": "A grid whose rows can be expanded and collapsed in the same manner as for a tree.\n\nIf aria-readonly is set on an element with role treegrid, user agents MUST propagate the value to all gridcell elements owned by the treegrid and expose the value in the accessibility API. An author MAY override the propagated value of aria-readonly for an individual gridcell element.\n\nWhen the aria-readonly attribute is applied to a focusable gridcell, it indicates whether the content contained in the gridcell is editable. The aria-readonly attribute does not represent availability of functions for navigating or manipulating the treegrid itself.\n\nIn a treegrid that provides content editing functions, if the content of a focusable gridcell element is not editable, authors MAY set aria-readonly to true on the gridcell element. However, if a treegrid presents a collection of elements that do not support aria-readonly, such as a collection of link elements, it is not necessary for the author to specify a value for aria-readonly.\n\nTo be keyboard accessible, authors SHOULD manage focus of descendants for all instances of this role, as described in Managing Focus.",
12959
12961
  "generalization": ["grid", "tree"],
12960
12962
  "requiredContextRole": [],
12961
- "requiredOwnedElements": ["row", "rowgroup > row"],
12963
+ "requiredOwnedElements": ["caption", "row", "rowgroup > row"],
12962
12964
  "accessibleNameRequired": true,
12963
12965
  "accessibleNameFromAuthor": true,
12964
12966
  "accessibleNameFromContent": false,
@@ -36246,7 +36248,7 @@
36246
36248
  "description": "This Boolean attribute specifies that the button should have input focus when the page loads. Only one element in a document can have this attribute."
36247
36249
  },
36248
36250
  "disabled": {
36249
- "description": "This Boolean attribute prevents the user from interacting with the button: it cannot be pressed or focused. Firefox, unlike other browsers, persists the dynamic disabled state of a <button> across page loads. To control this feature, use the [autocomplete]] (#autocomplete) attribute."
36251
+ "description": "This Boolean attribute prevents the user from interacting with the button: it cannot be pressed or focused. Firefox, unlike other browsers, persists the dynamic disabled state of a <button> across page loads. To control this feature, use the autocomplete attribute."
36250
36252
  },
36251
36253
  "form": {
36252
36254
  "description": "The <form> element to associate the button with (its form owner). The value of this attribute must be the id of a <form> in the same document. (If this attribute is not set, the <button> is associated with its ancestor <form> element, if any.) This attribute lets you associate <button> elements to <form>s anywhere in the document, not just inside a <form>. It can also override an ancestor <form> element."
@@ -40752,7 +40754,7 @@
40752
40754
  "contentModel": {
40753
40755
  "contents": [
40754
40756
  {
40755
- "zeroOrMore": ["option", "optgroup"]
40757
+ "zeroOrMore": ["option", "optgroup", "hr", "#script-supporting"]
40756
40758
  }
40757
40759
  ]
40758
40760
  },
@@ -42054,10 +42056,6 @@
42054
42056
  "#HTMLLinkAndFetchingAttrs": ["crossorigin"]
42055
42057
  },
42056
42058
  "attributes": {
42057
- "autopictureinpicture": {
42058
- "description": "A Boolean attribute which if true indicates that the element should automatically toggle picture-in-picture mode when the user switches back and forth between this document and another document or application.",
42059
- "experimental": true
42060
- },
42061
42059
  "autoplay": {
42062
42060
  "description": "A Boolean attribute; if specified, the video automatically begins to play back as soon as it can do so without stopping to finish loading the data. Note: Sites that automatically play audio (or videos with an audio track) can be an unpleasant experience for users, so should be avoided when possible. If you must offer autoplay functionality, you should make it opt-in (requiring a user to specifically enable it). However, this can be useful when creating media elements whose source will be set at a later time, under user control. See our autoplay guide for additional information about how to properly use autoplay. To disable video autoplay, autoplay=\"false\" will not work; the video will autoplay if the attribute is there in the <video> tag at all. To remove autoplay, the attribute needs to be removed altogether. In some browsers (e.g. Chrome 70.0) autoplay doesn't work if no muted attribute is present."
42063
42061
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markuplint/html-spec",
3
- "version": "3.7.0",
3
+ "version": "3.9.0",
4
4
  "description": "A specification of HTML Living Standard for markuplint",
5
5
  "repository": "git@github.com:markuplint/markuplint.git",
6
6
  "author": "Yusuke Hirao <yusukehirao@me.com>",
@@ -12,23 +12,16 @@
12
12
  "access": "public"
13
13
  },
14
14
  "scripts": {
15
- "gen": "ts-node gen/index.ts; prettier --write index.json"
15
+ "gen": "npm-run-all gen:*",
16
+ "gen:build": "node build.mjs",
17
+ "gen:prettier": "prettier --write index.json"
16
18
  },
17
19
  "devDependencies": {
18
- "@types/cheerio": "^0.22.31",
19
- "@types/cli-progress": "^3.11.0",
20
- "@types/node-fetch": "2",
21
- "ajv": "^8.11.2",
22
- "cheerio": "^1.0.0-rc.12",
23
- "cli-progress": "^3.11.2",
24
- "fast-xml-parser": "^4.0.12",
25
- "glob": "^9.2.1",
26
- "node-fetch": "2",
27
- "strip-json-comments": "3",
28
- "type-fest": "^3.7.0"
20
+ "@markuplint/spec-generator": "3.9.0",
21
+ "@markuplint/test-tools": "3.4.0"
29
22
  },
30
23
  "dependencies": {
31
- "@markuplint/ml-spec": "3.7.0"
24
+ "@markuplint/ml-spec": "3.9.0"
32
25
  },
33
- "gitHead": "42b97b47d22b37437024e693a72a458e2963e261"
26
+ "gitHead": "af370797bfc887e5a5a2ff57fbaa8392ac98ead2"
34
27
  }
@@ -0,0 +1,87 @@
1
+ const { readFile } = require('node:fs/promises');
2
+ const path = require('node:path');
3
+
4
+ const { resolveNamespace, getAttrSpecsByNames } = require('@markuplint/ml-spec');
5
+ const { glob } = require('@markuplint/test-tools');
6
+ const Ajv = require('ajv');
7
+ const strip = require('strip-json-comments');
8
+
9
+ const htmlSpec = require('../index');
10
+
11
+ const schemas = {
12
+ element: {
13
+ $id: '@markuplint/ml-spec/schemas/element.schema.json',
14
+ ...require('@markuplint/ml-spec/schemas/element.schema.json'),
15
+ },
16
+ aria: {
17
+ $id: '@markuplint/ml-spec/schemas/aria.schema.json',
18
+ ...require('@markuplint/ml-spec/schemas/aria.schema.json'),
19
+ },
20
+ contentModels: {
21
+ $id: '@markuplint/ml-spec/schemas/content-models.schema.json',
22
+ ...require('@markuplint/ml-spec/schemas/content-models.schema.json'),
23
+ },
24
+ globalAttributes: {
25
+ $id: '@markuplint/ml-spec/schemas/global-attributes.schema.json',
26
+ ...require('@markuplint/ml-spec/schemas/global-attributes.schema.json'),
27
+ },
28
+ attributes: {
29
+ $id: '@markuplint/ml-spec/schemas/attributes.schema.json',
30
+ ...require('@markuplint/ml-spec/schemas/attributes.schema.json'),
31
+ },
32
+ types: {
33
+ $id: '@markuplint/types/types.schema.json',
34
+ ...require('../../types/types.schema.json'),
35
+ },
36
+ };
37
+
38
+ test('structure', () => {
39
+ htmlSpec.specs.forEach(el => {
40
+ const { localName, namespaceURI } = resolveNamespace(el.name);
41
+ try {
42
+ getAttrSpecsByNames(localName, namespaceURI, htmlSpec);
43
+ } catch (e) {
44
+ throw el;
45
+ }
46
+ });
47
+ });
48
+
49
+ describe('schema', () => {
50
+ const map = [
51
+ [
52
+ 'spec.*.json',
53
+ new Ajv({
54
+ schemas: [
55
+ schemas.element,
56
+ schemas.aria,
57
+ schemas.contentModels,
58
+ schemas.globalAttributes,
59
+ schemas.attributes,
60
+ schemas.types,
61
+ ],
62
+ }).getSchema(schemas.element.$id),
63
+ path.resolve(__dirname, 'spec.*.json'),
64
+ ],
65
+ [
66
+ 'spec-common.attributes.json',
67
+ new Ajv({
68
+ schemas: [schemas.globalAttributes, schemas.attributes, schemas.types],
69
+ }).getSchema(schemas.globalAttributes.$id),
70
+ path.resolve(__dirname, 'spec-common.attributes.json'),
71
+ ],
72
+ ];
73
+
74
+ for (const [testName, validator, targetFiles] of map) {
75
+ test(testName, async () => {
76
+ const files = await glob(targetFiles);
77
+ for (const jsonPath of files) {
78
+ const json = JSON.parse(strip(await readFile(jsonPath, { encoding: 'utf-8' })));
79
+ const isValid = validator(json);
80
+ if (!isValid) {
81
+ throw new Error(`${path.basename(jsonPath)} is invalid (${validator.schemaEnv.baseId})`);
82
+ }
83
+ }
84
+ expect(testName).toBe(testName);
85
+ });
86
+ }
87
+ });