GithubHelp home page GithubHelp logo

adobe / coral-spectrum Goto Github PK

View Code? Open in Web Editor NEW
104.0 13.0 81.0 405.3 MB

A JavaScript library of Web Components following Spectrum design patterns.

Home Page: http://opensource.adobe.com/coral-spectrum/documentation

License: Apache License 2.0

JavaScript 61.47% HTML 11.91% CSS 22.11% Stylus 4.51%

coral-spectrum's Introduction

Checkout Spectrum Web Components which is a future-looking project to develop Adobe Spectrum design language based around web components, ES-Modules, and modern browser standards.

Coral Spectrum Build Status

A JavaScript library of Web Components following Spectrum design patterns.

Important

Please follow the Commit Message Conventions. To easily comply, it is recommended to use cz-cli.

Showcase

To see all components in action. These are only examples and don't cover all scenarios.

Covers the API for all components including properties, events and more.

Experiment and preview code with the latest Coral Spectrum version. Code can be shared by copy pasting the URL. The playground is sandboxed to prevent security risks.

Spectrum

The current default theme is is an implementation of the Spectrum design specifications, Adobe’s design system. Spectrum provides elements and tools to help product teams work more efficiently, and to make Adobe’s applications more cohesive.

Coral Spectrum leverages the Spectrum CSS framework to style components including the Spectrum SVG icons.

Angular, React, Vue.js compatibility

Our vision is to create consistent Adobe experiences by providing a complete, easy to use library of HTML components compatible with major frameworks.

To reach the goal, Coral Spectrum derives from Custom Elements v1 with native support thanks to broad collaboration between browser vendors. The use of custom elements gives us the ability to hide many implementation details from the consumer, allowing much more freedom to change the underlying markup that supports those elements. This makes the exposed API smaller and more explicit, resulting in a lower risk of updates to Coral Spectrum needing to introduce breaking changes.

Browser support

Coral Spectrum is designed to support the following browsers:

  • Chrome (latest)
  • Safari (latest)
  • Firefox (latest)
  • Edge (latest)
  • IE 11
  • iOS 7+
  • Android 4.4+

Theme (light, dark, lightest, darkest)

The default Coral Spectrum styles cascade from coral--light, coral--lightest, coral--dark and coral--darkest theme, so that class must be specified at a higher level.

<body class="coral--light">
    <!-- light theme -->
    <div class="container"></div>
    <div class="coral--dark">
        <!-- dark theme -->
    </div>
</body>

Large scale support

For mobile, Spectrum has a larger scale that enables larger tap targets on all controls. To enable it, the class coral--large must be specified at a higher level.

<body class="coral--light coral--large">
   <!-- light theme -->
   <!-- large scale -->
</body>

Built-in Accessibility and Keyboard support

Having an inaccessible application can mean thousands of dollars of fines if you land a government contract. It also means alienating an entire segment of society by making your application completely unusable to them. To help you avoid this, we’ve made it a rule that every Coral Spectrum component should be accessible.

Internationalization support

Coral Spectrum provides a robust internal system for internationalization of its strings. This is done via an internal Adobe process.

Supported languages are :

Language family Language tag Language variant
English en-US American English
French fr-FR Standard French
German de-DE Standard German
Italian it-IT Standard Italian
Spanish es-ES Castilian Spanish
Portuguese pt-BR Brazilian Portuguese
Japanese ja-JP Standard Japanese
Korean ko-KR Standard Korean
Chinese zh-CN Mainland China, simplified characters
Chinese zh-TW Taiwan, traditional characters
Dutch nl-NL Netherlands Dutch
Danish da-DK Standard Danish
Finnish fi-FI Standard Finnish
Norwegian no-NO Standard Norwegian
Swedish sv-SE Standard Swedish
Czech cs-CZ Standard Czech
Polish pl-PL Standard Polish
Russian ru-RU Standard Russian
Turkish tr-TR Standard Turkish

Using Coral Spectrum

Easiest way via a CDN

The easiest way to consume Coral Spectrum is to use a CDN e.g. copy these lines into your html file.

<head>
  <!-- 4.x.x means latest major 4 version release, adjust version if you need a specific one -->
  <link rel="stylesheet" href="https://unpkg.com/@adobe/[email protected]/dist/css/coral.min.css">
  <script src="https://unpkg.com/@adobe/[email protected]/dist/js/coral.min.js" data-coral-icons-external="js"></script>
</head>
<body class="coral--light">
  <button is="coral-button" icon="add">My Button</button>
</body>

Copying the distribution files

You can download a packaged/published version of @adobe/coral-spectrum from npm:

npm pack @adobe/coral-spectrum

After you've unzipped the downloaded package, look for the dist folder and :

  • Copy the files from dist/css, dist/js and dist/resources in your project.
  • Reference the files in your page e.g
<link rel="stylesheet" href="css/coral.min.css">
<script src="js/coral.min.js"></script>

Including entire library with a bundler like parcel

npm install @adobe/coral-spectrum

then in your main js, use:

require("@adobe/coral-spectrum/dist/js/coral.js");
require("@adobe/coral-spectrum/dist/css/coral.css");

Including only the components you need

If your project only requires a few components, you can use a module bundler like Webpack to only import the components needed. Below is an example of a Webpack config:

const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');

module.exports = {
  mode: 'production',
  devtool: 'source-map',
  entry: './src/index.js',
  output: {
    filename: 'bundle.min.js',
    path: path.resolve(__dirname, 'dist')
  },
  module: {
    rules: [
      {
        test: /\.js$/,
        use: {
          loader: 'babel-loader',
          options: {
            presets: ['@babel/preset-env']
          }
        }
      },
      {
        test: /\.svg$/,
        use: [
          {
            loader: 'file-loader',
            options: {
              name: 'icons/[name].[ext]'
            },
          },
        ]
      },
      {
        test: /\.css$/,
        use: [MiniCssExtractPlugin.loader, 'css-loader']
      }
    ]
  },
  plugins: [
    new MiniCssExtractPlugin({
      filename: 'style.min.css'
    }),
    new OptimizeCssAssetsPlugin({
      assetNameRegExp: /style\.min\.css$/g,
      cssProcessor: require('cssnano'),
      cssProcessorPluginOptions: {
        preset: ['default', { discardComments: { removeAll: true } }],
      }
    })
  ]
};

Then in your index.js file, you can import and use single components :

// Import Component
import {Button} from '@adobe/coral-spectrum/coral-component-button';

const button = new Button();

If icons are not displayed, ensure the path to the styles and icons are set e.g. :

<link rel="stylesheet" href="dist/style.min.css">
<script data-coral-icons="dist/icons/" src="dist/bundle.min.js"></script>

If icons still do not display, you can try setting them to display as inline SVGs, instead of external resources. Coral Spectrum will default to external resources on browsers other than IE11. Using the previous example, this option can be set with:

<link rel="stylesheet" href="dist/style.min.css">
<script data-coral-icons="dist/icons/" data-coral-icons-external="off" src="dist/bundle.min.js"></script>

Note: Calendar, Clock and Datepicker components will leverage moment.js if available.

Contributing

Check out the contributing guidelines.

Building and Testing

Run the following commands first :

npm install -g gulp-cli
npm install

You can use below tasks to get started:

  • gulp to generate the build in the dist folder and run the dev server on localhost:9001 by default.
  • gulp build to generate the build in the dist folder.
  • gulp dev to run the dev server on localhost:9001 by default.
  • gulp test to run the tests. Test reports are in dist/coverage.
  • gulp docs to build the documentation in dist/documentation.
  • gulp axe to run the accessibility checks.

Each component can be built independently e.g. cd coral-component-button && gulp.

Releasing

Automatic release:

Merging the PR to master will trigger an automatic release Github Action. It is important to follow Angular Commit Message Conventions. It is recommended to use cz-cli for easy commits. Only fix and feat can trigger a release. If you want to skip release add [skip release] or [release skip] to the commit message

Manual releasing:

We are currently releasing this package on npm.

Before we get started, clean up your dependencies with the following command :

git checkout master
rm -rf node_modules && npm install

Then run gulp release. You'll be asked to bump the version (minor version bump by default). Coral Spectrum is following semantic versioning (either patch, minor or major).

The command will take care of increasing, tagging the version and publishing the package to npm.

If everything went well, run gulp deploy to publish the documentation on the gh-pages branch else revert the version bump.

coral-spectrum's People

Contributors

aaronius avatar amycasillas avatar cezcz avatar dwabyick avatar evrijkom avatar gabrielwalt avatar gknobloch avatar icaraps avatar joekukish avatar karstens avatar kptdobe avatar lazd avatar majornista avatar martinischeery avatar misterbrownlee avatar nickelser avatar oflorian avatar pareesh avatar razvanpra avatar richardhand avatar rpapani avatar sandru85 avatar semantic-release-bot avatar shreesub avatar solaris007 avatar stefangrimm avatar tinotruppel avatar tripodsan avatar visiongeist avatar vnznz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coral-spectrum's Issues

Since the last release, icons are not working.

Expected Behavior

should show the "actions" icon.

Actual Behavior

No icon. They don't even work on the official documentation examples

Reproduce Scenario (including but not limited to)

Anywhere icons are used.

Steps to Reproduce

Use anything that makes use of the Coral icons.

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

Coral Spectrum version

v4.10.3

Sample Code that illustrates the problem (use the Playground if possible)

Screenshots (if applicable)

image
image

Redundant aria-label attribute provided on icons/images that decorate associated text

Expected Behavior

When an icon is provided as a decoration to textual content, then the aria-label value should not be set on this image/icon element. Instead, the aria-hidden attribute should be added/set to true and the alt attribute should be added/set to an empty String.

This is the recommended approach to handling visual elements that merely decorate associated text. Otherwise, it becomes redundant for folks to hear an icon description that is nearly identical to the text content that goes with it (e.g. - tab labels, buttons, etc)

Actual Behavior

In many cases, the aria-label is added and a default value is assigned (not localized; separate issue) that is - often - nearly identical in nature to the associated text (e.g. - add icon next to text that says "Add users" will have aria-label of add)

Here is a list of all of the places I've seen this behavior occur, along with a description of the specific problem for each component:

  1. *Button - in all button variants (e.g. - AnchorButton, Button, etc) icon has alt property with no value, but aria-hidden is not set to true when text content also exists
  2. Tab - icon has aria-label value set, even when label text exists (not icon only tab, so icon labeling is redundant)
  3. SideNavItem - icon has aria-label value set, even when nav item text exists
  4. ListItem - icon has aria-label value set, even when list item text exists
  5. ColumnViewItem - icon has aria-label even when ColumnViewItemContent (text) exists in same column item

Reproduce Scenario (including but not limited to)

Observe tab labels and icons on the following page:

https://opensource.adobe.com/coral-spectrum/dist/playground/#?livereload=true&screen=vertical&code=MTczLDE0NSw2MSw3OSwxOTUsNDgsMTYsMTM0LDEwMywyNTAsNDMsMTQsMjM5LDE0MSwyNDcsMjAyLDEzNywxMzIsMTAsMTE1LDE0NSwyMTgsMTMzLDIwOSwxNzcsMTQzLDE5OCwxNzMsMTkxLDIyOCwxMTUsMTM0LDI0MCwyMzUsMTM3LDEwOSw4NSwyMCwyMiwyNCwxNTIsMTI0LDMxLDE3NSwyMjMsMTg3LDcxLDM5LDMwLDE1OSwxNSwyNTEsMjExLDIxOSwyMzUsMTEsNzYsMjE3LDIxNyw5NywzNSwxMTAsMTUsNzQsNjEsMTA4LDAsMTMyLDUzLDI1NCwxMCw5LDEwOSwyMDcsNDAsNDcsMjIsMTA1LDY2LDIwNCwxMiwxNjYsMTMyLDIzOSw2MSwxNTUsMTE0LDE0MiwxODAsMjI3LDYwLDY4LDI0NCwyMCwyMzAsMTY0LDE3NiwxNDcsNTgsMTQwLDIxNiwxNjksMjI0LDE4NCwxMCw3MywyMTgsNDUsNjksODQsNTcsMjA1LDE0MiwxMDcsNjcsMTUzLDcxLDQzLDE1MSwxMTUsMTAsMTc5LDIxNSw0NSw4Nyw2OCw3NywyMTUsMTczLDE3LDIyNywxMTcsMzIsMTY5LDEwMCw5OCw2LDc0LDIzNCwzMSw2LDkyLDExMCwyNTQsMjMsOTgsMTMxLDIyNCwyMDUsMTIzLDE5NywyMjcsMTQxLDc5LDE0MCw2NSw0NywxNjAsMTcyLDM2LDIzNCw4OSwyNDMsMjE5LDkwLDExNSwxNTgsNTAsMTcxLDE3MSwxODAsNzQsMTUwLDE2Myw5MywxODksMTI4LDIwNCw3LDI0NiwyMzYsODgsOTEsMjQ3LDIwNSwyMjUsMzYsNzEsNTYsMTIwLDIwLDI1MiwxNzEsMjQ0LDY3LDIsNzAsNSw5NSwzOCw1NiwxMzUsMTI2LDUzLDIyMywxODMsMjI0LDI0NywzMSw4MiwyMzUsMTc4LDI0NywxNTksMTAwLDc5LDkwLDEyNyw4Myw2MiwyMjAsMTAxLDUsMTYwLDk2LDIzLDIyMiwxMzgsOTUsMTc1LDI1Miw5&

Steps to Reproduce

(see above)

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

Chrome Version 79.0.3945.130 (Official Build) (64-bit) MacOS

Coral Spectrum version

Latest (see link to playground; above)

Sample Code that illustrates the problem (use the Playground if possible)

See link (above) in Reproduce Scenario section

Screenshots (if applicable)

N/A

Correct existing test case "should be possible open popover attached to an action inside more popover" in test.ActionBar.js

test case name "should be possible open popover attached to an action inside more popover" needs to be corrected as it is passing when the issue is reproducible too.

Expected : The test case should fail when issue is reproducible

Actual Behaviour : The test case passes everytime

Reproduce Scenario (including but not limited to)

Steps to reproduce: open a popover through an actionItem inside another popover.

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

Coral Spectrum version

Sample Code that illustrates the problem (use the Playground if possible)

Screenshots (if applicable)

to fix the test cases already tried below steps:

tried with two similar popover inside more button. Still the test case passes everytime.

Also tried writing a new TC using the html ActionBar.base.html and then inserted a popover similar to relate popover in more action bar (to imitate the exact behaviour in aem). But still no success. .

First tag in a list of tags is not saved for multi-value dropdown filter

Expected Behavior

All tags should be retained on saving the properties of an asset.

Actual Behavior

When a user opens the "Properties" page of an asset that's configured to use a multivalue dropdown filter, on hitting "Save" (or "Save and Close"), the first value from the dropdown field is removed from the asset metadata.

For example, if there are 3 values initially set for an asset, say "A", "B" and "C", on opening the properties page, these 3 values show up as tags below the multivalue dropdown field as expted. After saving (even without making any other changes) and reopening the "Properties" page, only two tags are visible "B" and "C".

The screenshot below shows that the input field associated with the first coral-tag is missing the value for the "value" attribute even though the "value" attribute of the coral-tag element itself is correctly set.

Coral Spectrum version

4.11.0

Sample Code that illustrates the problem (use the Playground if possible)

It seems that the coral-tag "value" is not correctly set when the tag is first created here: https://github.com/adobe/coral-spectrum/blob/master/coral-component-select/src/scripts/Select.js#L976

item._tag.set({ 
    value: item.value, 
    label: { 
        innerHTML: item.innerHTML 
    }
}, true); 

Replacing the second line in the code snippet above with the following fixes this issue:

value: itemValueFromDOM(item)

Screenshots (if applicable)

metadata-missing-issue

Introduce semantic release

Expected Behavior

Introduce semantic release

Actual Behavior

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

Coral Spectrum version

Sample Code that illustrates the problem (use the Playground if possible)

Screenshots (if applicable)

Firefox: Numberinput: Displays two sets of increment/decrement arrows

Expected Behavior

Only one set of increment/decrement arrows are used for input

Actual Behavior

Two sets (Coral Spectrum created and Firefox browser created) arrows are rendered

Reproduce Scenario (including but not limited to)

Platform/OS: Any
Browser: Firefox

Steps to Reproduce

  1. Open https://opensource.adobe.com/coral-spectrum/dist/examples/#numberinput
  2. Observe input elements

Browser name/version/os

Firefox Quantum 69.0.1 (64-bit) Mac OS Mojave version 10.14.6 (18G95)

Coral Spectrum version

Latest

Sample Code that illustrates the problem (use the Playground if possible)

<coral-numberinput></coral-numberinput>

Screenshots (if applicable)

Screen Shot 2019-09-23 at 2 02 23 PM

Select with multiple=true does not send events for deselected items

Expected Behavior

change should be triggered when the item is de-selected.

Actual Behavior

change is not triggered.

Reproduce Scenario (including but not limited to)

Create a coral-select with multiple=true and register a listener for the event change.

Steps to Reproduce

Select items in the list, note the change event is triggered.
De-select items, note the change event is not triggered.

Note, it appears the unit tests think they’re covering this with https://github.com/adobe/coral-spectrum/blob/master/coral-component-select/src/tests/test.Select.js#L1687, but I believe that oldSelection is empty, leading to it being treated as a new selection.

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

Any

Coral Spectrum version

1.0.0-beta.90

Sample Code that illustrates the problem (use the Playground if possible)

In my local usage, master...boag:jb_select resolves this problem (though I would also expect to need unit test changes prior to PR).

Screenshots (if applicable)

Autocomplete showsuggestions event provide inconsistent input value

Expected Behavior

Logs (lower cased and trimmed):

""
" "
"te"
"test"
"test"
"test"

or (untouched):

""
" "
" TE"
" TEST"
" TEST "
" TEST "

Actual Behavior

Logs:

""
" "
"te"
"test"
"test"
" TEST "

Reproduce Scenario (including but not limited to)

Steps to Reproduce

  1. visit the playground (see below)
  2. focus the autocomplete field
  3. enter TEST (with surounding spaces)
  4. open browser devtools console

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

  • Chrome 115.0.5790.56 64-bit Windows 10
  • Firefox 116.0b3 Windows 10

Coral Spectrum version

4.15.20

Sample Code that illustrates the problem (use the Playground if possible)

Playground example

Screenshots (if applicable)

N/A

[Masonry][Accessibility] aria-multiselectable incorrectly appears on coral-masonry element with role="row"

Expected Behavior

With ariaGrid="on", when the selectionMode for coral-masonry is set to "single" or "multiple", aria-multiselectable should be added to the parentElement of the coral-masonry element, which has role="grid", rather than the coral-masonry element itself, which has role="row".

Actual Behavior

With ariaGrid="on", when the selectionMode for coral-masonry is set to "single" or "multiple", aria-multiselectable gets added to the coral-masonry element itself, which has role="row", instead of the appropriate parent element with role="grid". This will be identified by automated accessibility testing tools as an invalid use of WAI-ARIA. See https://www.w3.org/TR/wai-aria-1.1/#aria-multiselectable.

Reproduce Scenario (including but not limited to)

https://opensource.adobe.com/coral-spectrum/examples/#masonry or any AEM UI using coral-masonry.

Steps to Reproduce

  1. Open https://opensource.adobe.com/coral-spectrum/examples/#masonry example.
  2. Click either of the Selection mode links labelled "single" or "multiple" to set the selection mode.
  3. Use aXe DevTools Chrome extension to scan page.
  4. aXe reports following error:

Elements must only use allowed ARIA attributes
Element Location

#example-preview #masonry

Element Source

<coral-masonry orderable="" id="masonry" layout="fixed-centered" columnwidth="250" aria-label="Masonry" ariagrid="on" role="row" class="_coral-Masonry is-loaded is-selectable" selectionmode="multiple" style="height: 600px;" aria-multiselectable="true">

To solve this problem, you need to...

Fix the following:
ARIA attribute is not allowed: aria-multiselectable="true"

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

Chrome Version 105.0.5195.125 (Official Build) (arm64) MacOS

Coral Spectrum version

v4.15.2

Sample Code that illustrates the problem (use the Playground if possible)

In the code below, one can see that aria-multiselectable attribute is being added directly to the coral-masonry element rather than its parent with role="grid":

set selectionMode(value) {
value = transform.string(value).toLowerCase();
this._selectionMode = validate.enumeration(selectionMode)(value) && value || selectionMode.NONE;
this._reflectAttribute('selectionmode', this._selectionMode);
if (this._selectionMode === selectionMode.NONE) {
this.classList.remove('is-selectable');
this.removeAttribute('aria-multiselectable');
} else {
this.classList.add('is-selectable');
this.setAttribute('aria-multiselectable', this._selectionMode === selectionMode.MULTIPLE);
}
this._validateSelection();
}

Screenshots (if applicable)

Invalid syntax of spectrum-icons-color.js

Expected Behavior

Do not throw syntax error

Actual Behavior

Throw "Uncaught SyntaxError: Invalid or unexpected token (at spectrum-icons-color.js:1:61)"

New lines is injected inside a single quote string literal

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Inject in a page spectrum lib withdata-coral-icons-external equal to js:

<script src="/path/to/@adobe/coral-spectrum/dist/js/coral.min.js" data-coral-icons-external="js" defer></script>
<link rel="stylesheet" href="/path/to/@adobe/coral-spectrum/dist/css/coral.min.css">

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

Coral Spectrum version

4.15.23

Sample Code that illustrates the problem (use the Playground if possible)

Sample code in Playground

Screenshots (if applicable)

Coral-card overflow check unnecessary when no alerts are present

Expected Behavior

Conditional checks for adding ${Class_name}--overflow class to coral-card is done irrespective of whether alerts/banners are present for the card or not.

Actual Behavior

Checks need to be done only when the card has at least one alert/banner.

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Discovered while using button is=coral-button inside a coral-card.

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

Chrome Version 80.0.3987.87

Coral Spectrum version

Sample Code that illustrates the problem (use the Playground if possible)

Screenshots (if applicable)

Runtime created elements (button) do not processed (from Dart)

Expected Behavior

Runtime added buttons show correct styling

Actual Behavior

Runtime created buttons stay the same as default browser <button ...>

Reproduce Scenario (including but not limited to)

Repo: https://github.com/DQvsRA/Wire
Example: Counter (web)
See: example/counter/web/components/counter_button.dart

Steps to Reproduce

  1. Clone repo
  2. Open in IntelliJ IDEA
  3. Create build configuration - Dart Web
  4. Add path to example/counter/index.html
  5. Debug

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

Any browser

Coral Spectrum version

I use: https://opensource.adobe.com/coral-spectrum/dist/playground/dist/css/coral.css

Sample Code that illustrates the problem (use the Playground if possible)

It works in playground with JS: https://opensource.adobe.com/coral-spectrum/dist/playground/#?livereload=true&screen=vertical&code=MTczLDE0Niw2MSw3OSw0LDMzLDE2LDEzNCwyMzUsMjE5LDk1LDEyOSw4OCwyMzYsMTUzLDIzMiwyMTAsMjcsMTE4LDE5LDE5MSwxMCwxMSw2MywxOCwxMDksNDQsODksMjQsMTExLDgxLDE0LDg2LDEwMiwyNDYsMjQ0LDI1MiwyNDUsMTk0LDIyNSwyNDksMTcsMTQxLDE0OSwyMTMsNDgsMjA0LDE5NSw1OSwyNDMsMiwxMTQsMjMxLDI0NCwyMzQsMjI4LDI0NiwyMzgsMjUwLDE0MCwxMywxODAsMTE2LDkzLDM3LDE4MywxLDE0OCwyMzMsNDIsMTk4LDE2NCwxNzksMjU0LDE0NSw2OSwxMTIsNDUsNzEsOTAsNTksMTkyLDEsMTI4LDU2LDI3LDM0LDIyMCwxODMsMTI0LDMyLDI2LDI0MSw4MCwxMzYsNDgsMTMwLDE5OSw0OCw2OSwxMywxNDEsNTAsMTYxLDEzNSw3MCwxMzUsMTY1LDIwOCwzMyw0MiwxMTksMTI4LDM1LDEwNCwxMzgsMjExLDgyLDI0LDEzOSwzNiw3MCwxNjcsMjE0LDEzOSwyNCwzOCwxMTEsNzQsMTc0LDE3LDExLDIxNSwxNjQsMjEsMjMsMTU1LDEzNCwxNjgsMTYzLDI5LDEzNyw5NywyMTIsMjU1LDIwOCwyMjQsOTcsMTcxLDI1NSwxMjgsMTg4LDE0NywxNjIsMTA0LDM5LDEyMywxNjIsMjQ4LDE0NywxMjUsNDgsMTA3LDE2NiwxNTcsNjYsMTA4LDEyMSwyMDksNTksMTEyLDExOCw0OSwxNiwyMTksMzgsNDIsNDYsMTI4LDExOSwyMTMsNzYsMjYsMTg3LDI1MCw0LDYxLDQxLDIzNSwzMywxMTQsMTAyLDc3LDIwMyw5OSw4LDE0OCwxNDUsMTUzLDIzNiwzOSwxNjIsMjI0LDE1MywyNTMsMTYsNDMsMjcsMTg4LDU5LDI0Nyw1OCwxMzAsNjYsMTQ0LDE2MiwyMzYsMjUyLDc3LDE1OSwxOTQsMTUsOTAsMzgsNTksMTcxLDYwLDExOSwzMCw1NiwxOTcsMTczLDE0NSwyMTcsNzQsNjksMjMwLDEyMywyMTQsNTAsMTksMjQ0LDE4MCw0LDc5LDc3LDYyLDc1LDExMiwyMzAsMzIsMTAzLDI0MywxODYsNzIsMjEyLDEyMywyMTMsMjA0LDI0NywxMyw4OSwxMTQsMTQ0LDk2LDEyNiw5LDIwNywyMzYsMTg0LDE4MCwyMTksMjAsMTcyLDc5LDExOCwxMTAsMjI1LDEzMywxMjYsNDMsMzQsMjA4LDE3LDgxLDE4MCw3MywxMCwyMzAsMTgxLDE5NywxMjIsMTU5LDIxMyw5NSwzOSwxMjYsMjMsMjU1LDE0MiwxNjUsMTkzLDE3MiwyNDIsMTQ4LDg5LDMsMjQ3LDEwNiwxMTQsMjQ0LDQzLDEzNCwyNDYsMjEsNTAsMTE1LDE0NSwxNzEsMjE3LDc2LDE5MCwyMDUsMTc1LDExOCwxNTgsMzgsMTM2LDIzNSwyNywxMTIsMjMzLDE0OSw2NywxNTYsMjE1LDE4NywxODUsMTU4LDIxNywyOCwyNyw1MywxNjYsMTQzLDk3LDIzMCwxOTAsMjIzLDE3MSwxOTAsNjEsMjM4LDIzMCwxNSwxOTEsMQ==&

Screenshots (if applicable)

Screenshot 2020-06-13 at 17 34 03

accessible spectrum-css properties?

is it somehow possible to access the spectrum-css properties in my designs when using coral-spectrum?

// my themeable additions:
#myOwnThing { background-color: var(--spectrum-alias-background-color-default); }

Support for TypeScript for CoralUI

Type of Issue

  • Bug
  • Feature Request
  • Enhancement
  • Support for typescript

Current Behaviour

  • The coral-spectrum package only works with Javascript and does not support types at all for TypeScript

Requested Behaviour

  • To be able to work in Typescript by using types for CoralUI and include it in projects using React, Angular, or Vue.

Implementation

  • It could be implemented by adding an external package with types
  • Adding the types withing the coral-spectrum package.

Why requesting this feature?

  • To work with typescript based projects and including basic Coral-Spectrum from package registry does not work since the package does not have types defined.
  • Typescript is getting extremely popular in the community and it is being accepted by community with amazing love and support
  • Coral is an amazing minimal UI library. Being able to include it in TypeScript projects will help developers like me to include minimalistic UI components into our projects and promote CoralUI library
  • Makes the package more scalable and use with either a javascript/typescript project

SideNav on Examples page is not keyboard accessible

Expected Behavior

User should be able to navigate through SideNav items using the Tab key, and SideNav items should be identified a links using assistive technology.

Actual Behavior

SideNav items are skipped entirely. Using a screen reader the SideNav items are identified as static text.

Reproduce Scenario (including but not limited to)

https://opensource.adobe.com/coral-spectrum/dist/examples/#accordion

Steps to Reproduce

  1. Open https://opensource.adobe.com/coral-spectrum/dist/examples/#accordion
  2. Tab into the page, moving focus to the Search input.
  3. Press Tab to move focus to the SideNav.
  4. Notice that focus skips to the Links for selecting the theme in the upper right hand side of the iframe.

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

All

Coral Spectrum version

1.0.0-beta.116

Not able to integrate with angular app

Expected Behavior

  • Should be able to import coral components directly into angular app

Actual Behavior

  • Should be able to load the web component inside angular app

Reproduce Scenario (including but not limited to)

  • Initial integration with angular app

Steps to Reproduce

  1. Create a ng app using ng new coral-angular-app
  2. npm install npm install @adobe/coral-spectrum
  3. Add import statement to app.component.ts import '@adobe/coral-spectrum/coral-component-accordion';
  4. Add component markup to app.component.html from this sample

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

  • All browsers

Coral Spectrum version

  • 4.10.0

Sample Code that illustrates the problem (use the Playground if possible)

Screenshots (if applicable)

Screenshot 2020-09-17 at 11 06 21 PM

Elements in `ActionBar` inside `more` not responding to bond event handlers

Expected Behavior

When page size changes, elements shown in more dropdown should keep the same behavior from it's original element.

Actual Behavior

All event listeners are gone.

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

Coral Spectrum version

Sample Code that illustrates the problem (use the Playground if possible)

Screenshots (if applicable)

[Masonry][Accessibility] Files: Main Navigation (Card View) - Selected state of the folder is not announced to the screen reader

Expected Behavior

A screen reader should accurately announces the selected/unselected state of Masonry items, which in AEM will contain Card View items and folders.

Actual Behavior

A screen reader does not accurately announce the selected/unselected state of Masonry items, which in AEM will contain Card View items and folders.

Reproduce Scenario (including but not limited to)

https://opensource.adobe.com/coral-spectrum/examples/#masonry or any AEM UI using coral-masonry.

Steps to Reproduce

Described in ASSETS-6844

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

Chrome Version 105.0.5195.125 (Official Build) (arm64) MacOS

Coral Spectrum version

v4.15.2

Possible solution

  1. Incorporate #245 to ensure that the coral-masonry grid is identified as supporting selection using aria-multiselectable.
  2. Hide the coral-checkbox component using aria-hidden="true", so that while it provides a visual affordance for the selected state, the selected state for the item will be communicated to assistive technology using aria-selected on each of the cells.
  3. Ensure that aria-selected attribute is included on each masonry item, when selectionMode !== 'none'
  4. Ensure that the accessibilityState status message is not hidden on mac-like devices when the item is selected. This should ensure that the "Checked" state of an item is communicated by VoiceOver.

[Accessibility] Revert bcfbe99b73e69198fd303e5b4f0ac5be2437e6c6 aXe - fix missing localization for aria-label strings

Expected Behavior

Coral-Spectrum should not add non-meaningful label strings to components in order to pass aXe accessibility unit tests. For example:

<label class="_coral-Checkbox-label" handle="labelWrapper" for="{{this.input.id}}">
  <span class="u-coral-screenReaderOnly" handle="screenReaderOnly">{{data.i18n.get('Select')}}</span>
</label>

From bcfbe99#diff-931723f1f811c434792fe675311bcc82R9

If a control is not labeled, it should throw an error rather than mask accessibility problems with generic labels, e.g. "Select" for a checkbox.

Instead, we should update unit tests and examples to include labels to avoid accessibility failures when running gulp axe.

Actual Behavior

Controls like Checkbox and List include non-meaningful default labels like "Select" or "List", that trick the aXe accessibility testing tool into thinking all controls are labeled. In production, this masks accessibility failures by incorrectly labeling controls.

Reproduce Scenario (including but not limited to)

Observe this simple example of a checkbox without a label:

<coral-checkbox />

A hidden default accessibility label "Select" has been added to the control. An automated accessibility testing tool, like aXe, will fail to identify this as a problem.

Steps to Reproduce

  1. Open https://opensource.adobe.com/coral-spectrum/dist/playground/#?livereload=true&screen=vertical&code=MTczLDE0NCw2MSwxNCwxOTQsNDgsMTIsMTMzLDExOSw3OCwxNywxNzgsMTgzLDIyMiw4MSwyMTgsNSwxNTIsOTcsOTYsOTcsNzYsMjksMjExLDIwLDIxMCwzOCwxMzgsOTMsMTM3LDIyMiwxNTgsMjEwLDEzNiwyNyw0OCwyNDksNzEsMjQ2LDI0NywyNTIsMTA4LDI0NiwxNjcsMjAzLDI0MSwxMTgsMTkxLDE1OCwxNDksMTUxLDQ5LDE4MCw1OSwyNDMsMTEsMTAwLDkzLDE4Nyw4MywyMDIsMTMyLDk3LDEyMiwxNjksNzYsMTYxLDIwOSw0NCw3NSwzMiwyNDYsNjgsMTYyLDE0OSwyMDcsMjQ0LDEwNCwxODAsMjMsNzMsMTI0LDAsMTM2LDEzNywzOCwxNDIsMTE1LDcwLDE3MCwxNzMsMTM5LDI5LDIxMywyNCw3MSwxOTIsMTUyLDEwOSwxNjgsNTYsMTcsNzQsMTU4LDcxLDExMiwzLDExLDE2NCw5NiwxNTEsNjIsMTk5LDEyMSwxMTQsMTY1LDcwLDIzMCw1MCw4NywxNzUsMTUzLDEzNCw3NywxNDQsNDksMTUsNzMsMjAsMTAzLDI1MiwxMzEsMTkyLDI0MywxOTksMTI3LDE3OCwxMTAsMTMsMjAsMjQ2LDEwNiwxNSwxMzgsNjMsMjExLDY5LDE4Myw0MCwxMiwxNTAsMTg1LDIwOSwxMzMsODcsMTMzLDE2MSwyNDcsMTYyLDE4Myw4Myw3NCw3LDYxLDIyNSwxNzEsMTM5LDExMSw1LDIyMywxOTcsMjM5LDE5OCw2LDIxNiwyNTQsMjQ0LDE=&
  2. Inspect the rendered checkbox with Web Inspector
  3. Under Web Inspector > Accessibility panel note that the checkbox without a visible is labeled "Select"

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

All

Coral Spectrum version

4.0.1

Sample Code that illustrates the problem (use the Playground if possible)

https://opensource.adobe.com/coral-spectrum/dist/playground/#?livereload=true&screen=vertical&code=MTczLDE0NCw2MSwxNCwxOTQsNDgsMTIsMTMzLDExOSw3OCwxNywxNzgsMTgzLDIyMiw4MSwyMTgsNSwxNTIsOTcsOTYsOTcsNzYsMjksMjExLDIwLDIxMCwzOCwxMzgsOTMsMTM3LDIyMiwxNTgsMjEwLDEzNiwyNyw0OCwyNDksNzEsMjQ2LDI0NywyNTIsMTA4LDI0NiwxNjcsMjAzLDI0MSwxMTgsMTkxLDE1OCwxNDksMTUxLDQ5LDE4MCw1OSwyNDMsMTEsMTAwLDkzLDE4Nyw4MywyMDIsMTMyLDk3LDEyMiwxNjksNzYsMTYxLDIwOSw0NCw3NSwzMiwyNDYsNjgsMTYyLDE0OSwyMDcsMjQ0LDEwNCwxODAsMjMsNzMsMTI0LDAsMTM2LDEzNywzOCwxNDIsMTE1LDcwLDE3MCwxNzMsMTM5LDI5LDIxMywyNCw3MSwxOTIsMTUyLDEwOSwxNjgsNTYsMTcsNzQsMTU4LDcxLDExMiwzLDExLDE2NCw5NiwxNTEsNjIsMTk5LDEyMSwxMTQsMTY1LDcwLDIzMCw1MCw4NywxNzUsMTUzLDEzNCw3NywxNDQsNDksMTUsNzMsMjAsMTAzLDI1MiwxMzEsMTkyLDI0MywxOTksMTI3LDE3OCwxMTAsMTMsMjAsMjQ2LDEwNiwxNSwxMzgsNjMsMjExLDY5LDE4Myw0MCwxMiwxNTAsMTg1LDIwOSwxMzMsODcsMTMzLDE2MSwyNDcsMTYyLDE4Myw4Myw3NCw3LDYxLDIyNSwxNzEsMTM5LDExMSw1LDIyMywxOTcsMjM5LDE5OCw2LDIxNiwyNTQsMjQ0LDE=&

Icon should not overtake aria-label

Expected Behavior

Developer can setup aria-label or aria-labelledby to anything in an Icon.
This is an extension of https://github.com/adobe/coral-spectrum/issues/20

Actual Behavior

Coral forces usage of autogenerated aria-label.

Reproduce Scenario (including but not limited to)

Run:

Steps to Reproduce

  1. Run the code above.
  2. Inspect that aria-label is "Add"
  3. Expected value for aria-label should be "My aria label"

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

Irrelevant

Coral Spectrum version

4.1.0

Sample Code that illustrates the problem (use the Playground if possible)

https://opensource.adobe.com/coral-spectrum/dist/playground/#?livereload=true&screen=vertical&code=MTczLDE0NCwxNzcsMTQsMTk0LDQ4LDEyLDY4LDI0NywxMjYsMTMzLDIyOSwxNTcsMTAyLDcxLDEwNSwzNywxMTgsMjE2LDg5LDIxMSwxOTYsMjA4LDY0LDEwNCwzNCwyMTksMjksMjAyLDIxNSwyMTEsNTQsNjYsMjUyLDAsMTM5LDEyNSwzOSw4OSwyMzksMTE2LDE4MiwzNSwxODUsMjA4LDU1LDAsNTQsMTk3LDIzMyw5LDc2LDE2OSw2NywyMDksMzcsMTQ1LDE0MCw2OCwxMzgsNDgsNTAsMjIxLDU4LDI4LDg1LDEzOSwyOCwxNDEsMjAxLDEzMywzOCwyMDEsNTEsMTIzLDEwNiw5MywyMDAsMywxODEsNjIsMTkxLDE0MCwyMDcsMjM2LDIxMCw2NSwxMCwxMjEsMjI5LDI0OSwxMDEsNjYsMjAsNTMsMzcsMTg1LDIyOSwyMDYsMTIxLDE1OCw2NiwyNDUsOTQsMTY0LDIyMiwxODEsMTcxLDY2LDE3OSw3LDEzOCwyMzEsODgsMjAsMTMyLDI1MywzMSwyLDMwLDk1LDI1NCw2NywxNzYsMTgzLDE2NiwxNzgsMjUxLDE5OCwxNTQsMjE4LDIwNywxNCw1Nyw0NCwyMzUsMTcwLDE2OCwyMzIsMjQzLDQsMjE5LDIzMiwyMDgsMTMzLDEyOCwxNjAsODEsMTksMTE3LDEyMCwyMTgsMTgwLDE5NiwyNDcsNDIsMTc1LDIxNSw1MSwyLDU2LDE0MiwyMzgsMTQ0LDIyMCwxNzYsNjEsMjI5LDE3OCwyMzYsMjIsMTE4LDE4Nyw2OSwyNTIsODAsMTI1LDI0Mywx&

Screenshots (if applicable)

Proposed steps

  1. Add parameter to coral icon, to ignore aria-label generation when not necessary.
  2. Mark _updateAltText as deprecated, provide warning about future removal of aria-label generation in coral

Memory leaks in component Table

Actual Behavior

After I did the scenario (that below) a couple of time, I see the JS heap size and count of DOM Nodes grow dramatically

Reproduce Scenario (including but not limited to)

To reproduce the scenario in your example (https://opensource.adobe.com/coral-spectrum/examples/#tabview) and switch between component table page and tab list page(for example) .

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

Chrome Version 89.0.4389.114 (Official Build) (64-bit) Windows

Coral Spectrum version

https://opensource.adobe.com/coral-spectrum/examples/#table

Screenshots (if applicable)

coral table memory leak

Coral Spectrum Tab uses only the color red to indicate that it's invalid

Expected Behavior

The Coral Spectrum Tab component shouldn't use only the color red to show that it is invalid, but also have a more obvious element. This would be an accessibility improvement, especially for color blind users.

Actual Behavior

Coral Spectrum Tab only uses the color red to indicate that it's invalid.

Reproduce Scenario (including but not limited to)

When working with a Coral Spectrum Tablist component and you have a Tab component set to invalid, the only difference is the red color.

Steps to Reproduce

  1. Add Chromelens plugin for Google Chrome (https://chrome.google.com/webstore/detail/chromelens/idikgljglpfilbhaboonnpnnincjhjkd).
  2. Start up the Coral Spectrum Tablist component examples page ( coral-component-tablist/examples/index.html ) by using gulp.
  3. Go to http://127.0.0.1:9001/examples/.
  4. From Developer Tools, go to Chromelens and select one of the following: Achromatopsia (RGB-Blind), Protanopia ( Red - blind ).
  5. Check that the invalid tab is resembling all the other tabs.

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

Google Chrome Version 80.0.3987.149 (Official Build) (64-bit)

Coral Spectrum version

4.3.1

Sample Code that illustrates the problem (use the Playground if possible)

Check coral-component-tablist/examples/index.html.

Screenshots (if applicable)

Example with Chromelens Achromatopsia:

image

Not able to customize the coral-shell-solutionswitcher nav to create different type of menu systems

Expected Behavior

Should be able to customize the coral-shell-solutionswitcher nav to create different type of menu systems like for example the drop down menu on CNN site. Should also be able to control the sort order coral-shell-solutions, currently it sorts only in alphabetical order. Also, need to be able to change the icon size, padding, and others by just adding parameters in the component than having to write additional styles.

Actual Behavior

I am able to use the coral-shell-solutionswitcher only in the way that is demonstrated in the Shell example.

Reproduce Scenario (including but not limited to)

Always

Steps to Reproduce

Try to use the coral-shell-solutionswitcher to create the navigation menu something similar to the CNN dropdown menu which is very simple, we may also try to create other complex ones. The menu does not fall in proper place and also the order is changed to alphabetical order even as we would like it to be in the order that it is added.

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

Chrome Version 87.0.4280.88 (Official Build) (64-bit) Windows 10

Coral Spectrum version

v4.10.11

Sample Code that illustrates the problem (use the Playground if possible)

    <coral-shell-menu id="menu_solutions" placement="top" from="top" full="" top="">
        <coral-shell-solutionswitcher>
            <coral-shell-solutions>
                <a is="coral-shell-solution" icon="" href="#">About Us</a>
                <a is="coral-shell-solution" icon="" href="#">Contact Us</a>
            </coral-shell-solutions>
            <coral-shell-solutions>
                <a is="coral-shell-solution" icon="" href="#">News</a>
                <a is="coral-shell-solution" icon="" href="#">Events</a>
                <a is="coral-shell-solution" icon="" href="#">Awards</a>
                <a is="coral-shell-solution" icon="" href="#">Feeds</a>
            </coral-shell-solutions>
            <coral-shell-solutions>
                <a is="coral-shell-solution" icon="" href="#" linked="">CURATE NEWS</a>
                <a is="coral-shell-solution" icon="" href="#">ADD EVENT</a>
                <a is="coral-shell-solution" icon="" href="#">ADD RECOGNITION</a>
                <a is="coral-shell-solution" icon="" href="#">SUGGEST FEED</a>
            </coral-shell-solutions>
            <coral-shell-solutions secondary="">
                <a is="coral-shell-solution" icon="" href="#">Daily Brief</a>
                <a is="coral-shell-solution" icon="" href="#">Communities</a>
                <a is="coral-shell-solution" icon="" href="#">Topics</a>
                <a is="coral-shell-solution" icon="" href="#">Evaluations</a>
            </coral-shell-solutions>
        </coral-shell-solutionswitcher>
    </coral-shell-menu>

Screenshots (if applicable)

Use of restricted fonts in the default theme

Hello,

The library is based on Adobe Clean fonts, which are downloaded from Internet and whose use is restricted to Adobe products. This raises a few questions:

  1. Is there any way to avoid loading any font from the Internet?

  2. If Coral Spectrum is considered an Adobe product by licence terms, which would permit the use of these restricted fonts, are we allowed to use these fonts in other widgets we would use in the same application?

  3. Is there any way to replace the use of Adobe Clean fonts with other, third party, fonts?

Thank you

[ActionBar] Popovers with same id in Coral.Actionbar.

Expected Behaviour : There shouldn't be popovers with duplicate id or target.

Actual behaviour : There are popovers with duplicate id or target.

Reproduce Scenario (including but not limited to)

When actions with popover goes offscreen, popovers from these actions are cloned into more popover [0], [1] which results into duplicate items with same id.

[0] : https://github.com/adobe/coral-spectrum/blob/master/coral-component-actionbar/src/templates/overlayContent.html#L20
[1] : https://github.com/adobe/coral-spectrum/blob/master/coral-component-actionbar/src/scripts/BaseActionBarContainer.js#L188

Steps to Reproduce

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

Coral Spectrum version

4.8.5

Sample Code that illustrates the problem (use the Playground if possible)

See in the below playground, the relate action inside more popover doesn't open linked popover on click because 2 popover s with same id exists and the display call goes to first popover which is offscreen.
link_to_reproduce

Screenshots (if applicable)

[Accessibility] User is unable to navigate the Calendar using shortcut keys (Arrow keys, (Alt +) PageUp, PageDown, etc)

Transitioning away from Moment.js to DateTime breaks some keyboard functionality, because APIs for navigating by week or calculating the number of days in a month are missing in DateTime.

Expected Behavior

  1. User should be able to navigate Calendar grid by week using ArrowUp/ArrowDown, by month using PageUp/PageDown, and by year using Alt+PageUp/Alt+PageDown.
  2. Calendar should account for the differences in length between months and navigate to the last day of the next or previous month when the current date does not appear in the next or previous month.
  3. DateTime should account for Daylight Savings Time when calculating the difference between dates when one of the dates falls in Daylight Savings Time but the other date does not.

Actual Behavior

  1. User is unable to navigate Calendar grid by week using ArrowUp/ArrowDown, or by year using Alt+PageUp/Alt+PageDown.
  2. Calendar does not account for the differences in length between month, so that when a user navigates from a date that does not appear in the next month focus is lost.
  3. DateTime does not account for Daylight Savings Time when calculating the difference between dates when one of the dates falls in Daylight Savings Time but the other date does not, which causes the Calendar to add or lose a day when navigating between dates where one date is observing Daylight Savings Time while the other date does not.

Reproduce Scenario (including but not limited to)

AEM: See: https://jira.corp.adobe.com/browse/CQ-4310946 and https://jira.corp.adobe.com/browse/CUI-7438

Steps to Reproduce

  1. Open https://opensource.adobe.com/coral-spectrum/examples/#calendar
  2. Navigate into the first Calendar instance using the Tab key.
  3. Note that while you can navigate by day using ArrowLeft or ArrowRight keys, and by month using PageUp or PageDown, ArrowUp or ArrowDown do not navigate by week, and Alt + PageUp or Alt + PageDown do not navigate by year.
  4. Navigate to Jan 31 of any year.
  5. Try to navigate to February using PageDown key.
  6. Notice that the cursor indicating the selected is lost when the Calendar transitions to February.

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

Version 87.0.4280.88 (Official Build) (x86_64)

Coral Spectrum version

v4.10.11

Sample Code that illustrates the problem (use the Playground if possible)

Screenshots (if applicable)

Autocomplete issue with "(" and "&" characters

Expected Behavior

A user can enter the characters:

  • "(": Open parenthesis
  • "&": Ampersand

Actual Behavior

These keys work as arrow down "(" and arrow up "&". The reason is this:

  • In Ascii, 38 decimal represents ampersand, whereas the keyCode on KeyboardEvents is arrow up
  • In Ascii, 40 decimal represents open parenthesis, whereas the keyCode on KeyboardEvents is arrow down

https://www.ascii-code.com/
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode

Reproduce Scenario (including but not limited to)

Using a Swiss German keyboard layout, add an Coral.Autocomplete field with some items and try to enter either "(" or "&" in the text field. If you have a suggestion list, these keys will navigate up and down the list.

The exact line of code responsible for this:

comboListeners = this._keyListeners[event.key.charCodeAt(0)];

This also happens in AEM 6.5.8 and probably all 6.5 versions.

[Accessibility] Tree implementation should conform to WAI-ARIA 1.2 design pattern

Expected Behavior

Per: https://jira.corp.adobe.com/browse/CQ-4272964

Coral-Spectrum Tree implementation should conform with WAI-ARIA Authoring Practice design pattern: https://www.w3.org/TR/wai-aria-practices-1.2/#TreeView

  • ArrowRight should expand focused "drilldown" node.
  • ArrowLeft should collapse focused "drilldown" node.
  • Use aria-expanded and aria-owns to properly express the hierarchical relationship of a parent item to its subTreeContainer
  • Improve labelling of nodes to better communicate selected or unselected state.
  • Improve labelling of subTreeContainer.
  • On mobile devices provide mechanism to expand or collapse and to toggle selection using a mobile screen reader.

Actual Behavior

  • ArrowRight navigates to next item
  • ArrowLeft navigated to previous item
  • Expanded state is not communicated to assistive technology, and the tree hierarchy is incorrect, because each subTreeContainer follows its parent item in the DOM with now aria-owns property to express the hierarchical behavior.
  • On mobile there is no way to expand/collapse independent of select/deselect using a mobile screen reader. The button to expand or collapse should be independent from the mechanism to select or deselect.

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

All

Coral Spectrum version

v4.0.0

Coral Datetime may reference non-existent moment locale

Expected Behavior

Correctly set locale to US English, if browser locale is set to this locale

Actual Behavior

Fails to set locale correctly, as moment version used does not contain a moment for the code used in many browsers (e.g. - Chrome uses en-us on a Macbook Pro, whereas moment refers to this locale as simply en)

Runtime error encountered: Error: Cannot find module './en-US'

Reproduce Scenario (including but not limited to)

Run your unit tests in debug mode with the option to "Pause on caught exceptions" selected? That's how I hit this situation when testing our project locally (which, includes latest Coral; 4.10.0)

Steps to Reproduce

(see above)

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

Browser: Chrome Version 85.0.4183.83 (Official Build) (64-bit)
OS: (Mac) Version 10.15.6 (19G73)

Coral Spectrum version

This code (https://github.com/adobe/coral-spectrum/blob/master/coral-datetime/index.js) hasn't changed in 16 months and I'm not sure that moment ever supported an en-us locale, as their rationale for not including seems to amount to "that's our language, so we just call it English" (kind of disappointing)

Sample Code that illustrates the problem (use the Playground if possible)

n/a

Screenshots (if applicable)

IMG_20200826_131602

coral-card-title doesn't render in Vue when inside coral-card

Expected Behavior

The coral-card-title is rendering

Actual Behavior

The coral-card-title doesn't render

Reproduce Scenario (including but not limited to)

Create a Vue3 project, import coral project code, and add all elements to render a card successfully as shown in examples

Steps to Reproduce

  • npm install -g @vue/cli
  • Create a vue3 project vue create hello-world with default options
  • npm i @adobe/coral-spectrum --save
  • import coral js and css into main.js
  • use any card example that contains coral-card-title from documentation https://opensource.adobe.com/coral-spectrum/examples/#card
  • preview your vue project, and you see coral-card-title is not rendered

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

  • Chrome latest (64-bit) (Windows 10)

Coral Spectrum version

Version: 4.10.12

Sample Code that illustrates the problem (use the Playground if possible)

https://jsfiddle.net/fydks2m4/

Extra

I have a theory that it's due to the usage of "insertBefore" in card component, when I comment out line 194 to 197 in Card.js it works

Tooltip do not show up after focus with keyboard

Expected Behavior

Coral Tooltip to open when focused using tab key

Actual Behavior

When element is focused using a keyboard nothing happens, tooltip appears only on hover

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Create a tooltip, try to focus it with by tabbing to it.

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

Chrome 80.0.3987.163
Firefox 74.0
(64-bit) MacOS

Coral Spectrum version

4.5.7

Sample Code that illustrates the problem (use the Playground if possible)

Screenshots (if applicable)

Fix proposition

Vent doesn't handle space separated events, it has to be a single event each time.
Here:
https://github.com/adobe/coral-spectrum/blob/master/coral-component-tooltip/src/scripts/Tooltip.js#L308

We try to register two events separated by a space.

Coral-Tree example throws an error on Playground

Expected Behavior

Example given here should work on Playground as well.

Actual Behavior

JavaScript throws an error as follows :
Tree.js:476 Uncaught TypeError: Cannot read property 'header' of undefined at HTMLElement._resetFocusableItem (Tree.js:476) at HTMLElement.render (Tree.js:527) at HTMLElement.connectedCallback (BaseComponent.js:789) at q.connectedCallback (custom-elements.min.js:9) at y (custom-elements.min.js:9) at A (custom-elements.min.js:7) at B.f (custom-elements.min.js:10)

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

Chrome

Coral Spectrum version

Coral-Spectrum 4.2

Sample Code that illustrates the problem (use the Playground if possible)

Link to PlayGround

Screenshots (if applicable)

Output

Referencing coral causes customElements.upgrade to become undefined

Expected Behavior

Reference coral library. Use component libraries like lit-element, which assume customElements.upgrade

Actual Behavior

Code errors out, because customEleemnts.upgrade isn't defined.

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Open playground Open dev tools and type customElements.upgrade

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

Chrome 79

Coral Spectrum version

Unknown

Sample Code that illustrates the problem (use the Playground if possible)

Screenshots (if applicable)

[Search][Select][Textarea][Textfield] Correct placeholder text color contrast

Expected Behavior

Placeholder text for Search, Select, Textarea and Textfield components should comply with WCAG 2.1 AA contrast ratio requirements with a contrast ratio between the foreground text color and the background color or at least 4.5:1.

Actual Behavior

Currently, Coral-Spectrum uses var(--spectrum-global-color-gray-600); from Spectrum-CSS, for the ::placeholder text color in Search, Select, Textarea and Textfield components, which results in placeholder text with a contrast ratio of 3:1, which does not comply with WCAG 2.1 AA contrast ratio requirements.

Spectrum-CSS includes a fix for this in v3.0.1, (see adobe/spectrum-css@011ca54), updating Coral-Spectrum to use this version of Spectrum-CSS is not trivial.

A simpler suggested fix would be to change the value in Coral-Spectrum to use var(--spectrum-global-color-gray-700); to satisfy the requirement.

Reproduce Scenario (including but not limited to)

Steps to Reproduce

  1. Go to https://opensource.adobe.com/coral-spectrum/examples/#textfield, https://opensource.adobe.com/coral-spectrum/examples/#textarea, https://opensource.adobe.com/coral-spectrum/examples/#select, https://opensource.adobe.com/coral-spectrum/examples/#clock.
  2. Inspect the placeholder text element in the sub-dom for any of the enabled textfield examples that use placeholder.
  3. Observe that the color specified in CSS for the placeholder element has a contrast ratio of 3:1, for the .coral-lightest theme it's rgb(149, 149, 149).

Browser name/version/os

Version 89.0.4389.114 (Official Build) (x86_64) on macOS

Coral Spectrum version

v4.10.16

Sample Code that illustrates the problem (use the Playground if possible)

Coral Spectrum Playground Example:

<!DOCTYPE html>
<html>
<head>
	<title>Placeholder text color contrast example</title>
	<link rel="stylesheet" href="https://opensource.adobe.com/coral-spectrum/playground/dist/css/coral.css"/>
	<script src="https://opensource.adobe.com/coral-spectrum/playground/dist/js/coral.js"></script>
	<style>
		body {
			margin: 1rem
		}
	</style>
</head>
<body class="coral--lightest">
	<p>
		<label for="lifestory" class="coral-FieldLabel">Life Story</label>
		<input id="lifestory" placeholder="Enter your life story" name="field" is="coral-textfield"/>
	</p>
	<p>
		<label for="lifestory2" class="coral-FieldLabel">Life Story</label>
		<textarea id="lifestory2" placeholder="Enter your life story" name="field" is="coral-textarea"></textarea>
	</p>
	<p>
		<label id="country-label" class="coral-FieldLabel">Country</label>
		<coral-select placeholder="Choose an country" labelledBy="country-label">
			<coral-select-item value="tza">Tanzania - United Republic of Tanzania, Northwest</coral-select-item>
			<coral-select-item value="are">United Arab Emirates</coral-select-item>
			<coral-select-item value="gbr">United Kingdom</coral-select-item>
			<coral-select-item value="usa">United States of America and the republic for which it stands, one nation</coral-select-item>
		</coral-select>
	</p>
</body>
</html>

Screenshots (if applicable)

Current behavior:

Current behavior using Gray-600

Desired behavior:

Current behavior using Gray-700

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.