Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Releases: nrkno/core-components

v10.0.0

16 Aug 07:39
Compare
Choose a tag to compare

What's Changed

  • Released @nrk/[email protected]
    • Core toggle data prefix for popup attribute by @skjalgepalg in #650
    • Major release to address error logged in developer console in Chrome (v104) due to Open-UI pop-up API adoption (see #649)

Migration guide for @nrk/[email protected]

  • Add data- prefix to popup attribute

Plain JS:
<core-toggle class="my-dropdown" popup hidden> -> <core-toggle class="my-dropdown" data-popup hidden>

React:
<CoreToggle className='my-dropdown' popup='Example picker' hidden> -> <CoreToggle className='my-dropdown' data-popup='Example picker' hidden>

DevDependencies

Full Changelog: v9.3.0...v10.0.0

v9.3.0

10 Aug 10:51
Compare
Choose a tag to compare

What's Changed

Full Changelog: v9.2.2...v9.3.0

v9.2.2

08 Jul 09:21
Compare
Choose a tag to compare

What's Changed

Full Changelog: v9.2.1...v9.2.2

v9.2.1

21 Jun 14:15
Compare
Choose a tag to compare

What's Changed

  • core-dialog no longer focuses elements with tabindex="-1" when tab-cycling through all elements inside dialog by @skjalgepalg in #646

Full Changelog: v9.2.0...v9.2.1

v9.2.0

30 May 08:51
Compare
Choose a tag to compare

What's Changed

@nrk/[email protected]

Enhancements

  • Notify screen readers when core-suggest displays suggestions
  • Supplement with updates when suggestions are filtered
  • Supplement with update when all suggestions are hidden by filter
  • Add attributes to override default values for screen reader notifications
  • Note that defaults are in Norwegian Bokmål
  • Add optional support for reading textContent when no suggestions are present
  • Useful for conveying load/error-state to screen readers
  • Support custom updates to screen reader with pushToLiveRegion for complex implementations
  • Guarantee id on core-suggest element with uuid when not set

Fixes

  • Set aria-controls along with aria-expanded to conform with WAI-ARIA examples
  • Set role combobox on input consistently across all devices

Docs

  • Add section, Notes on accessibility, to document screen reader compatibility
  • Add instructions for aria-live region
  • Add note on how to disable default filtering
  • Consolidate examples for plain js and react under respective headers
  • Update examples for legibility and to better showcase available features
  • Fix bad URL for ajax- and lazy- examples

Tests

  • Add tests for aria-live behavior

Full Changelog: v9.1.2...v9.2.0

v9.1.2

20 Apr 06:44
Compare
Choose a tag to compare

What's Changed

  • Added section to docs for Core dialog on how to prevent background scrolling by @skjalgepalg in #643
  • Updated various (dev)dependencies

Full Changelog: v9.1.1...v9.1.2

v9.1.1

13 Dec 08:59
Compare
Choose a tag to compare

Releases

What's Changed

  • fix: Handle decimal values for scroll-directions when browser is zoomed

Full Changelog: v9.1.0...v9.1.1

v9.1.0

11 Nov 09:39
Compare
Choose a tag to compare

What's Changed

[email protected]

Enhancements

  • Optional attribute tab to set active tab
  • Added support for fewer panels than tabs
  • Added support for no panels, mainly for robustness

Fixes

  • No longer dispatches a tabs.toggle-event on initialization
  • Panels referenced by multiple tabs (through data-for) has correct aria-labelledBy to active (referencing) tab
  • aria-labelledBy is updated when tab is toggled.
  • Improvements to reliability of getter-functions

New Contributors

Full Changelog: v9.0.0...v9.1.0

[email protected]

18 Oct 12:28
Compare
Choose a tag to compare

[email protected]

Breaking

  • The timestamp-attribute has been deprecated in favor of the date-attribute
    • Note: Limited support is kept help aid with migration; value is treated like date (see below) but logs to console.warn on initialisation to help identify where migration is necessary. timestamp -attribute is removed from DOM to avoid confusion with date.
  • New optional date-attribute takes any value supported by simple-date-parse
    • if date is set to null the attribute is treated the same as if removed through removeAttribute.
  • When no date (or deprecated timestamp) -attribute is present, core-datepicker has no value (see below)

Migration guide

  • Replace uses of deprecated timestamp -attribute to use date
    • Consider if using the values supported through simple-date-parse can make it easier to convey intention or just reduce overhead (e.g. simply setting attribute value to date="now + 1 day" can save you a separate calculation of the value for relative tomorrow).
    • Use of deprecated timestamp -attribute will make a log to console.warn to help identify where you need to migrate. Note that the attribute has been removed in the DOM to avoid confusion with the date attribute'
  • If no date (or deprecated timestamp) is supplied, core-datepicker will no longer fallback to new Date(). Try it without any , as no value may be what you actually need, if not set attribute to date="now" to mimic the old fallback.

Enhancement

  • Support for core-datepicker to explicitly have no value

When date has no value:

  • All getters return null
  • Selecting the current date will dispatch a datepicker.change event
  • If a table (calendar view) is drawn:
    • The current month is drawn
    • autofocus and tabindex are set to the button with the current date in calendar
    • Keyboard navigation (up/down/left/right arrow) start from the current date.

Fixes

  • Support for external input/select/table -elements using data-for (and deprecated for) -attribute is back

Docs

  • Organized examples using tabs
  • Added example for functional React
  • Examples now use type="button" in buttons
  • English language is used in examples

Full Changelog: v8.0.0...v9.0.0

[email protected]

29 Sep 13:45
Compare
Choose a tag to compare

[email protected]

Breaking

  • Changed signature on backdrop-attribute
    • Replaces boolean true/false or "custom-ID" with "on", "off" or "custom-ID"

Migration guide

  • For plain JS, replace use of backdrop="false" with backdrop="off"
  • For React/JSX, replace backdrop={true/false} with backdrop={'off'}
  • core-dialog will print a console.warn when a custom ID is passed to backdrop and no matching element is found

Fixes

  • backdrop now renders as an HTML-attribute on the underlying custom-element for more consistent behavior.

Docs

  • Simplified examples by removing bloat
  • Added matching examples for plain JS and React/JSX
  • Examples now use type="button" in buttons

Full Changelog: v7.3.0...v8.0.0