GoScrobble/web/node_modules/dom-accessibility-api/CHANGELOG.md

15 KiB

dom-accessibility-api changelog

0.5.7

Patch Changes

0.5.6

Patch Changes

  • #666 26ee73d Thanks @eps1lon! - Consider <label /> when computing the accessible name of <output />

    Given

    <label for="outputid">Output Label</label> <output id="outputid"></output>
    

    Previously the accessible name of the <output /> would ignore the <label />. However, an <output /> is labelable and therefore the accessible name is now computed using <label /> elements if they exists. In this example the accessible name is "Output Label".

0.5.5

Patch Changes

  • #627 0485441 Thanks @eps1lon! - Ensure certain babel helpers aren't required

    Source:

    -const [item] = list;
    +const item = list[0];
    

    Transpiled:

    -var _trim$split = list.trim().split(" "),
    -_trim$split2 = _slicedToArray(_trim$split, 1),
    -item = _trim$split2[0]
    +var item = list[0];
    
  • #629 383bdb6 Thanks @eps1lon! - Use label attribute for naming of <optgroup> elements.

    Given

    <select>
    	<optgroup label="foo">
    		<option value="1">bar</option>
    	</optgroup>
    </select>
    

    Previously the <optgroup /> would not have an accessible name. Though 2D in accname 1.2 could be interpreted to use the label attribute:

    Otherwise, if the current node's native markup provides an attribute (e.g. title) or element (e.g. HTML label) that defines a text alternative, return that alternative [...]

    This was confirmed in NVDA + FireFox.

0.5.4

Patch Changes

  • 3866289 #442 Thanks @geoffrich! - Correctly determine accessible name when element contains a slot.

    Previously, computing the accessible name would only examine child nodes. However, content placed in a slot is is an assigned node, not a child node.

    If you have a custom element custom-button with a slot:

    <button><slot></slot></button>
    
    <!-- accname of inner <button> is 'Custom name' (previously '') -->
    <custom-button>Custom name</custom-button>
    

    If you have a custom element custom-button-default with default content in the slot:

    <button><slot>Default name</slot></button>
    
    <!-- accname of inner <button> is 'Custom name' (previously 'Default name') -->
    <custom-button-default>Custom name</custom-button-default>
    
    <!-- accname of inner <button> is 'Default name' (previously 'Default name') -->
    <custom-button-default></custom-button-default>
    

    This is not currently defined in the accname spec but reflects current browser behavior.

0.5.3

Patch Changes

  • 76e8f93 #430 Thanks @ckundo! - Maintain img role for img with missing alt attribute.

    Previously <img /> would be treated the same as <img alt />. <img /> is now treated as role="img" as specified.

  • 96d4438 #436 Thanks @eps1lon! - Resolve presentational role conflicts when global WAI-ARIA states or properties (ARIA attributes) are used.

    <img alt="" /> used to have no role. By spec it should have role="presentation" with no ARIA attributes or role="img" otherwise.

0.5.2

Patch Changes

  • 03273b7 #406 Thanks @eps1lon! - Fix various issues for input types submit, reset and image

    Prefer input value when type is reset or submit:

    <input type="submit" value="Submit values">
    -// accessible name: "Submit"
    +// accessible name: "Submit values"
    <input type="reset" value="Reset form">
    -// accessible name: "Reset"
    +// accessible name: "Reset form"
    

    For input type image consider alt attribute or fall back to "Submit query".

0.5.1

Patch Changes

  • fcc66ae #394 Thanks @marcosvega91! - Ignore title attribute if it is empty.

    Previously <button title="">Hello, Dave!</button> would wrongly compute an empty name.

0.5.0

Minor Changes

  • 9e46c51 #380 Thanks @eps1lon! - BREAKING CHANGE

    Ignore ::before and ::after by default.

    This was necessary to prevent excessive warnings in jsdom@^16.4.0. If you use this package in a browser that supports the second argument of window.getComputedStyle you can set the computedStyleSupportsPseudoElements option to true:

    computeAccessibleName(element, {
    	computedStyleSupportsPseudoElements: true
    });
    
    computeAccessibleDescription(element, {
    	computedStyleSupportsPseudoElements: true
    });
    

    If you pass a custom implementation of getComputedStyle then this option defaults to true. The following two calls are equivalent:

    computeAccessibleName(element, {
    	computedStyleSupportsPseudoElements: true
    });
    
    computeAccessibleName(element, {
    	getComputedStyle: (element, pseudoElement) => {
    		// custom implementation
    	}
    });
    

Patch Changes

0.4.7

Patch Changes

  • d6c4455 #352 Thanks @eps1lon! - Support native labels in IE 11

    Also affects Edge < 18 and Firefox < 56.

0.4.6

Patch Changes

  • f7c1981 #288 Thanks @eps1lon! - Drop node 13 support

    We only stopped testing. Probability of breakage should be very low.

    New policy:

    Only active node versions are supported. Inactive node versions can stop working in a SemVer MINOR release.

  • fa53c51 #210 Thanks @eps1lon! - Implement accessbile description computation

    import { computeAccessibleDescription } from "dom-accessibility-api";
    
    const description = computeAccessibleDescription(element);
    

    Warning: It always considers title attributes if the description is empty. Even if the title attribute was already used for the accessible name. This is fails a web-platform-test. The other failing test is due to aria-label being ignored for the description which is correct by spec. It's likely an issue with wpt. The other tests are passing (13/15).

0.4.5

Patch Changes

  • d668f72 #273 Thanks @eps1lon! - fix: Concatenate text nodes without space

    Fixes <h1>Hello {name}!</h1> in react computing "Hello name !" instead of Hello name!.

0.4.4

Patch Changes

  • 969da7d #240 Thanks @eps1lon! - Reduce over-transpilation

    Switched from

    • for-of to .forEach or a basic for loop
    • array.push(...otherArray) to push.apply(array, otherArray)

    This removed a bunch of babel junk that wasn't needed.

0.4.3

Patch Changes

  • b421d9e #168 Thanks @eps1lon! - fix: Use relative paths in exports field

    Fixes a crash when using ES modules in Node.

0.4.2

Minor Changes

  • 0897630 #155 - Publish version using ES6 modules allongside current CommonJS modules

0.4.1

Patch Changes

0.4.0

Minor Changes

Patch Changes

0.3.0

Minor Changes

  • 7f1ada0: Internal polish

0.2.0

Minor Changes

  • eb86842: Add option to mock window.getComputedStyle

    This option has two use cases in mind:

    1. fake the style and assume everything is visible. This increases performance (window.getComputedStyle) is expensive) by not distinguishing between various levels of visual impairments. If one can't see the name with a screen reader then neither will a sighted user
    2. Wrap a cache provider around window.getComputedStyle. We don't implement any because the returned CSSStyleDeclaration is only live in a browser. jsdom does not implement live declarations.

Bug Fixes

Features

  • name: Consider prohibited naming (#19) (6692d6b)
  • Consider all cases of "name from content" (#13) (835cb76)
  • Consider content from before and after pseudo elements (#5) (0987426)
  • Fork elementToRole from aria-query (#7) (fe4fab5)