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

Commit

Permalink
Revert "fix: 无障碍访问api" (#1705)
Browse files Browse the repository at this point in the history
This reverts commit 35a1af6.
  • Loading branch information
yesmeck committed Sep 9, 2021
1 parent 23e8307 commit 556fedb
Show file tree
Hide file tree
Showing 84 changed files with 38 additions and 3,736 deletions.
2 changes: 1 addition & 1 deletion packages/remax-ali/src/__tests__/components/View.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('View', () => {
const callback = () => void 0;

const testRenderer = TestRenderer.create(
<View ariaLabel="view" onAnimationStart={callback} catchClick={callback} className="class">
<View onAnimationStart={callback} catchClick={callback} className="class">
view
</View>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

exports[`View render correctly 1`] = `
<view
ariaLabel="view"
catchClick={[Function]}
className="class"
onAnimationStart={[Function]}
Expand Down
30 changes: 1 addition & 29 deletions packages/remax-ali/src/hostComponents/View/index.ts
Original file line number Diff line number Diff line change
@@ -1,35 +1,7 @@
import * as React from 'react';
import { createHostComponent } from '@remax/runtime';

/** 无障碍属性 */
// reference: https://opendocs.alipay.com/mini/component/accessibility
export interface AriaProps {
ariaHidden?: string;
ariaRole?: string;
ariaLabel?: string;
ariaChecked?: string;
ariaDisabled?: string;
ariaDescribedby?: string;
ariaExpanded?: string;
ariaHaspopup?: string;
ariaSelected?: string;
ariaRequired?: string;
ariaOrientation?: string;
ariaValuemin?: string;
ariaValuemax?: string;
ariaValuenow?: string;
ariaReadonly?: string;
ariaMultiselectable?: string;
ariaControls?: string;
tabindex?: string;
ariaLabelledby?: string;
ariaModal?: string;
ariaLive?: string;
ariaAtomic?: string;
ariaRelevant?: string;
}

export interface ViewProps extends AriaProps {
export interface ViewProps {
readonly dataset?: DOMStringMap;
id?: string;
className?: string;
Expand Down
24 changes: 0 additions & 24 deletions packages/remax-ali/src/hostComponents/View/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,6 @@ export const alias = {
onAppear: 'onAppear',
onDisappear: 'onDisappear',
onFirstAppear: 'onFirstAppear',
/** 无障碍属性 */
ariaHidden: 'aria-hidden',
ariaRole: 'aria-role',
ariaLabel: 'aria-label',
ariaChecked: 'aria-checked',
ariaDisabled: 'aria-disabled',
ariaDescribedby: 'aria-describedby',
ariaExpanded: 'aria-expanded',
ariaHaspopup: 'aria-haspopup',
ariaSelected: 'aria-selected',
ariaRequired: 'aria-required',
ariaOrientation: 'aria-orientation',
ariaValuemin: 'aria-valuemin',
ariaValuemax: 'aria-valuemax',
ariaValuenow: 'aria-valuenow',
ariaReadonly: 'aria-readonly',
ariaMultiselectable: 'aria-multiselectable',
ariaControls: 'aria-controls',
tabindex: 'tabindex',
ariaLabelledby: 'aria-labelledby',
ariaModal: 'aria-modal',
ariaLive: 'aria-live',
ariaAtomic: 'aria-atomic',
ariaRelevant: 'aria-relevant',
};

export const props = unique(Object.values(alias));

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 556fedb

Please sign in to comment.