Giter Club home page Giter Club logo

max-web-components's People

Contributors

dependabot[bot] avatar nnmax avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

renovate-bot

max-web-components's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency @rollup/plugin-typescript to v11.1.2
  • chore(deps): update dependency eslint-plugin-storybook to v0.6.13
  • chore(deps): update dependency lint-staged to v13.2.3
  • chore(deps): update dependency @web/test-runner to ~0.17.0
  • chore(deps): update dependency @nnmax/eslint-config-typescript to v2
  • chore(deps): update dependency prettier to v3
  • chore(deps): update typescript-eslint monorepo to v6 (major) (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/ci-on-pr.yml
  • actions/checkout v3
  • actions/setup-node v3
  • actions/cache v3
  • actions/checkout v3
  • actions/setup-node v3
  • actions/cache v3
  • actions/checkout v3
  • actions/setup-node v3
  • actions/cache v3
  • codecov/codecov-action v3
npm
package.json
  • lit-html ^2.7.3
  • @babel/cli ^7.21.5
  • @babel/core ^7.21.8
  • @babel/plugin-syntax-import-assertions ^7.20.0
  • @babel/preset-env ^7.21.5
  • @babel/preset-typescript ^7.21.5
  • @nnmax/eslint-config-typescript ^1.4.0
  • @open-wc/testing ^3.1.8
  • @rollup/plugin-typescript ^11.1.1
  • @storybook/addon-a11y ^7.0.8
  • @storybook/addon-actions ^7.0.9
  • @storybook/addon-docs ^7.0.9
  • @storybook/addon-essentials ^7.0.18
  • @storybook/addon-links ^7.0.18
  • @storybook/web-components ^7.0.8
  • @storybook/web-components-webpack5 ^7.0.8
  • @types/prettier ^2.7.2
  • @typescript-eslint/eslint-plugin ^5.59.5
  • @typescript-eslint/parser ^5.59.2
  • @web/dev-server-esbuild ~0.4.1
  • @web/test-runner ~0.16.1
  • acorn-import-assertions ^1.9.0
  • css-loader ^6.7.3
  • eslint ^8.39.0
  • eslint-config-prettier ^8.8.0
  • eslint-plugin-storybook ^0.6.12
  • husky ^8.0.3
  • lint-staged ^13.2.2
  • pinst ^3.0.0
  • prettier 2.8.8
  • react ^18.2.0
  • react-dom ^18.2.0
  • rollup ^3.21.5
  • rollup-plugin-import-assert ^3.0.1
  • storybook ^7.0.18
  • typescript ^5.0.4
  • node >=16
  • yarn 3.5.1

  • Check this box to trigger a request for Renovate to run again on this repository

Support Accordion Component

Accordion

<max-accordion-panel>

Attribute

name default description
disabled false 是否禁用当前面板
expanded false 是否展开当前面板

Event

name description
expanded-changed expanded 改变时会触发

结构

<max-accordion>
  <max-accordion-panel>
    <div slot="heading">Accordion Title 1</div>
    Other Content
  </max-accordion-panel>
</max-accordion>
<!-- <max-accordion-panel> -->
<div part="panel">
  <div role="heading" part="heading">
    <div role="button" part="heading-button" tabindex=0>
      <slot name="heading"></slot>
    </div>
  </div>
  <div part="content">
    <slot></slot>
  </div>
</div>
<!-- <max-accordion> -->
<div part="accordion">
  <slot></slot>
</div>

ARIA

  • 手风琴头的标题内需要有一个 rolebutton 的元素来触发收缩;
  • 手风琴头需要包含在一个适合页面结构的标题中;
  • Heading 元素内只能包含一个 Button 元素;
  • 如果与手风琴头关联的手风琴面板可见,则标题 button 元素需要将 aria-expanded 属性设置为 true。否则设置为 false;
  • 手风琴头标题的 button 元素需要将 aria-controls 属性设置为包含手风琴内容面板的元素 id;

键盘交互

  • Enter 或 Space

当焦点放在 折叠 面板的手风琴头上时,展开 关联的面板。

当焦点放在 展开 面板的手风琴头上时,折叠 关联的面板。

  • Tab

将焦点移动到下一个可聚焦元素;手风琴中的所有可聚焦元素都包含在页面 Tab 序列中。

  • Shift + Tab

将焦点移动到之前的可聚焦元素;手风琴中的所有可聚焦元素都包含在页面 Tab 序列中。

  • Down Arrow

如果焦点在手风琴标题上,请将焦点移动到下一个手风琴头。如果焦点在最后一个手风琴标题上,要么什么都不做,要么将焦点移动到第一个手风琴标题。

  • Up Arrow

如果焦点在手风琴标题上,请将焦点移动到之前的手风琴头。如果焦点在第一个手风琴标题上,要么什么都不做,要么将焦点移动到最后一个手风琴标题。

  • Home

当焦点放在手风琴头上时,将焦点移动到第一个手风琴头。

  • End

当焦点放在手风琴头上时,将焦点移动到最后一个手风琴头。

[Accordion] Tests

Accordion 组件测试计划

AccordionPanel

  • button 中应该只包含一个名称为 heading 的 slot
  • 设置了 disabled 后, button 应该有 aria-disabled 属性,并且 tabindex 为 -1
  • 默认情况下 button 是可聚焦的
  • button 包含一个 aria-controls 值为 content 容器的 id
  • 展开的时候, button 应该有一个 aria-expanded 属性
  • 有一个 role 为 heading 的元素, 并且 heading 中只能包含 button
  • 有一个默认的 slot 元素
  • 包含 expanded property, 并且修改会同步到 attribute
  • 包含 disabled property, 并且修改会同步到 attribute
  • 点击 button, 会触发 expanded 属性的更新
  • 点击 button, 会触发 expanded-changed 事件
  • button 获取焦点后, 会有 focused attribute
  • button 失去焦点后, 会将 focused attribute 删除
  • button 可以使用 Space 和 Enter 键触发

Accordion

  • 包含一个默认的 slot 元素
  • 包含一个 panels property
  • 修改 slot 元素会反应到 panels property 上
  • 当获取到焦点后,可以使用 ArrowDown, ArrowUp, Home 和 End 键移动焦点
  • 会触发 expanded-changed 事件

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.