-
Notifications
You must be signed in to change notification settings - Fork 82
fix: updated the fix for access related issues in dashboard component #4049
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Changes from 4 commits
6b8b494
e3eea24
f47ceb5
ce9ec3d
6a30a42
9c87cc4
1366108
a5f06a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,47 +57,51 @@ const ValueContent = ({ | |
| const attributeCount = content.attributes.length; | ||
|
|
||
| return ( | ||
| <div | ||
| className={classnames(`${BASE_CLASS_NAME}__content-wrapper`, { | ||
| [`${BASE_CLASS_NAME}__content-wrapper--vertical`]: layout === CARD_LAYOUTS.VERTICAL, | ||
| })} | ||
| > | ||
| {!dataState ? ( | ||
| content.attributes.map((attribute, index) => ( | ||
| <Attribute | ||
| key={`fragment-${attribute.dataSourceId}-${JSON.stringify(attribute.dataFilter || {})}`} | ||
| attribute={attribute} | ||
| attributeCount={attributeCount} | ||
| layout={layout} | ||
| locale={locale} | ||
| isEditable={isEditable} | ||
| title={title} | ||
| renderIconByName={others.renderIconByName} | ||
| value={determineValue(attribute.dataSourceId, values, attribute.dataFilter)} | ||
| secondaryValue={ | ||
| attribute.secondaryValue && { | ||
| ...attribute.secondaryValue, | ||
| value: determineValue(attribute.secondaryValue.dataSourceId, values), | ||
| <section id="main-content" aria-label="value content"> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can't we use same div to give aria-label instead of having
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hi @aqibibm , I have tried to repeat the issues from reference-app. issue (Content is not within a landmark element) was not repeating and main tag and role is already available from main page so these changes are not required. I have reverted these changes. and updated the PR. please review. Thank you!. |
||
| <div | ||
| className={classnames(`${BASE_CLASS_NAME}__content-wrapper`, { | ||
| [`${BASE_CLASS_NAME}__content-wrapper--vertical`]: layout === CARD_LAYOUTS.VERTICAL, | ||
| })} | ||
| > | ||
| {!dataState ? ( | ||
| content.attributes.map((attribute, index) => ( | ||
| <Attribute | ||
| key={`fragment-${attribute.dataSourceId}-${JSON.stringify( | ||
| attribute.dataFilter || {} | ||
| )}`} | ||
| attribute={attribute} | ||
| attributeCount={attributeCount} | ||
| layout={layout} | ||
| locale={locale} | ||
| isEditable={isEditable} | ||
| title={title} | ||
| renderIconByName={others.renderIconByName} | ||
| value={determineValue(attribute.dataSourceId, values, attribute.dataFilter)} | ||
| secondaryValue={ | ||
| attribute.secondaryValue && { | ||
| ...attribute.secondaryValue, | ||
| value: determineValue(attribute.secondaryValue.dataSourceId, values), | ||
| } | ||
| } | ||
| } | ||
| // Prefer new formatter. Fall back to legacy customFormatter. | ||
| formatter={formatter} | ||
| customFormatter={customFormatter} | ||
| fontSize={fontSize} | ||
| isNumberValueCompact={isNumberValueCompact} | ||
| testId={`${testId}-attribute-${index}`} | ||
| onValueClick={onAttributeClick} | ||
| // Prefer new formatter. Fall back to legacy customFormatter. | ||
| formatter={formatter} | ||
| customFormatter={customFormatter} | ||
| fontSize={fontSize} | ||
| isNumberValueCompact={isNumberValueCompact} | ||
| testId={`${testId}-attribute-${index}`} | ||
| onValueClick={onAttributeClick} | ||
| /> | ||
| )) | ||
| ) : ( | ||
| <DataStateRenderer | ||
| dataState={dataState} | ||
| size={size} | ||
| id={id} | ||
| testId={`${testId}-data-state`} | ||
| /> | ||
| )) | ||
| ) : ( | ||
| <DataStateRenderer | ||
| dataState={dataState} | ||
| size={size} | ||
| id={id} | ||
| testId={`${testId}-data-state`} | ||
| /> | ||
| )} | ||
| </div> | ||
| )} | ||
| </div> | ||
| </section> | ||
| ); | ||
| }; | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @aqibibm ,as I said above. I have reverted these changes. and updated the PR. please review. Thank you!.