Skip to content

0.5.0

Compare
Choose a tag to compare
@eps1lon eps1lon released this 10 Aug 21:49
· 516 commits to main since this release
1715af1

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