[Accessibility-3100036]: Close button is nested under 'Home' tab control under 'Data Explorer' pane. (#1818)
* [3100036]: [Programmatic Access - Azure Cosmos DB - Data Explorer]: Close button is nested under 'Home' tab control under 'Data Explorer' pane. * Fabric-Less updated. * Added specific width for contentWrapper. * less update. * Fixed out-scope space issue --------- Co-authored-by: Satyapriya Bai <v-satybai@microsoft.com>
This commit is contained in:
parent
b76d83d8e1
commit
52c2cfe419
|
@ -130,6 +130,7 @@
|
||||||
@ActiveTabWidth: 141px;
|
@ActiveTabWidth: 141px;
|
||||||
@TabsHeight: 30px;
|
@TabsHeight: 30px;
|
||||||
@TabsWidth: 140px;
|
@TabsWidth: 140px;
|
||||||
|
@ContentWrapper: 111px;
|
||||||
@StatusIconContainerSize: 18px;
|
@StatusIconContainerSize: 18px;
|
||||||
@LoadingErrorIconSize: 14px;
|
@LoadingErrorIconSize: 14px;
|
||||||
@ErrorIconContainer: 16px;
|
@ErrorIconContainer: 16px;
|
||||||
|
|
|
@ -2671,7 +2671,7 @@ a:link {
|
||||||
width: @ActiveTabWidth;
|
width: @ActiveTabWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-tabs > li.active > .tabNavContentContainer > .tab_Content > .tabNavText {
|
.nav-tabs > li.active > .tabNavContentContainer > .tab_Content > .contentWrapper> .tabNavText {
|
||||||
font-weight: bolder;
|
font-weight: bolder;
|
||||||
border-bottom: 2px solid rgba(0, 120, 212, 1);
|
border-bottom: 2px solid rgba(0, 120, 212, 1);
|
||||||
}
|
}
|
||||||
|
@ -2707,67 +2707,71 @@ a:link {
|
||||||
width: @TabsWidth;
|
width: @TabsWidth;
|
||||||
border-right: @ButtonBorderWidth solid @BaseMedium;
|
border-right: @ButtonBorderWidth solid @BaseMedium;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
.contentWrapper {
|
||||||
.statusIconContainer {
|
.flex-display();
|
||||||
width: @StatusIconContainerSize;
|
width: @ContentWrapper;
|
||||||
height: @StatusIconContainerSize;
|
|
||||||
margin-left: @SmallSpace;
|
.statusIconContainer {
|
||||||
display: inline-flex;
|
width: @StatusIconContainerSize;
|
||||||
|
height: @StatusIconContainerSize;
|
||||||
.errorIconContainer {
|
margin-left: @SmallSpace;
|
||||||
width: @ErrorIconContainer;
|
display: inline-flex;
|
||||||
height: @ErrorIconContainer;
|
|
||||||
margin-top: 1px;
|
.errorIconContainer {
|
||||||
|
width: @ErrorIconContainer;
|
||||||
.errorIcon {
|
height: @ErrorIconContainer;
|
||||||
width: @ErrorIconWidth;
|
margin-top: 1px;
|
||||||
height: @LoadingErrorIconSize;
|
|
||||||
background-image: url(../images/error_no_outline.svg);
|
.errorIcon {
|
||||||
background-repeat: no-repeat;
|
width: @ErrorIconWidth;
|
||||||
background-position: center;
|
height: @LoadingErrorIconSize;
|
||||||
background-size: 3px;
|
background-image: url(../images/error_no_outline.svg);
|
||||||
display: block;
|
background-repeat: no-repeat;
|
||||||
margin: 1px 0px 0px 6px;
|
background-position: center;
|
||||||
|
background-size: 3px;
|
||||||
|
display: block;
|
||||||
|
margin: 1px 0px 0px 6px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.errorIconContainer.actionsEnabled {
|
||||||
|
&:hover {
|
||||||
|
.hover();
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
.focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
.active();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.errorIconContainer[tabindex]:active {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loadingIcon {
|
||||||
|
width: @LoadingErrorIconSize;
|
||||||
|
height: @LoadingErrorIconSize;
|
||||||
|
margin: 0px 0px @SmallSpace @SmallSpace;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabNavText {
|
||||||
|
margin-left: @SmallSpace;
|
||||||
|
margin-right: 2px;
|
||||||
|
color: @BaseDark;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.errorIconContainer.actionsEnabled {
|
|
||||||
&:hover {
|
|
||||||
.hover();
|
|
||||||
}
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
.focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
&:active {
|
|
||||||
.active();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.errorIconContainer[tabindex]:active {
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.loadingIcon {
|
|
||||||
width: @LoadingErrorIconSize;
|
|
||||||
height: @LoadingErrorIconSize;
|
|
||||||
margin: 0px 0px @SmallSpace @SmallSpace;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.tabNavText {
|
|
||||||
margin-left: @SmallSpace;
|
|
||||||
margin-right: 2px;
|
|
||||||
color: @BaseDark;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
flex-grow: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tabIconSection {
|
.tabIconSection {
|
||||||
width: 30px;
|
width: 29px;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-top: 2px;
|
padding-top: 2px;
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ a:focus {
|
||||||
border-bottom: 2px solid @FabricAccentMedium;
|
border-bottom: 2px solid @FabricAccentMedium;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-tabs>li.active>.tabNavContentContainer>.tab_Content>.tabNavText {
|
.nav-tabs>li.active>.tabNavContentContainer>.tab_Content>.contentWrapper>.tabNavText {
|
||||||
border-bottom: 0px none transparent;
|
border-bottom: 0px none transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,9 +93,11 @@ a:focus {
|
||||||
width: calc(@TabsWidth - (@SmallSpace * 2));
|
width: calc(@TabsWidth - (@SmallSpace * 2));
|
||||||
padding-bottom: @SmallSpace;
|
padding-bottom: @SmallSpace;
|
||||||
|
|
||||||
.statusIconContainer {
|
.contentWrapper {
|
||||||
margin-left: 0px;
|
.statusIconContainer {
|
||||||
}
|
margin-left: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.tabIconSection {
|
.tabIconSection {
|
||||||
.cancelButton {
|
.cancelButton {
|
||||||
|
|
|
@ -153,47 +153,51 @@ function TabNav({ tab, active, tabKind }: { tab?: Tab; active: boolean; tabKind?
|
||||||
<li
|
<li
|
||||||
onMouseOver={() => setHovering(true)}
|
onMouseOver={() => setHovering(true)}
|
||||||
onMouseLeave={() => setHovering(false)}
|
onMouseLeave={() => setHovering(false)}
|
||||||
onClick={() => {
|
|
||||||
if (tab) {
|
|
||||||
tab.onTabClick();
|
|
||||||
} else if (tabKind !== undefined) {
|
|
||||||
useTabs.getState().activateReactTab(tabKind);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
onKeyPress={({ nativeEvent: e }) => {
|
|
||||||
if (tab) {
|
|
||||||
tab.onKeyPressActivate(undefined, e);
|
|
||||||
} else if (tabKind !== undefined) {
|
|
||||||
onKeyPressReactTab(e, tabKind);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
className={active ? "active tabList" : "tabList"}
|
className={active ? "active tabList" : "tabList"}
|
||||||
style={active ? { fontWeight: "bolder" } : {}}
|
style={active ? { fontWeight: "bolder" } : {}}
|
||||||
title={useObservable(tab?.tabPath || ko.observable(""))}
|
|
||||||
aria-selected={active}
|
|
||||||
aria-expanded={active}
|
|
||||||
aria-controls={tabId}
|
|
||||||
tabIndex={0}
|
|
||||||
role="tab"
|
|
||||||
ref={focusTab}
|
|
||||||
>
|
>
|
||||||
<span className="tabNavContentContainer">
|
<span className="tabNavContentContainer">
|
||||||
<div className="tab_Content">
|
<div className="tab_Content">
|
||||||
<span className="statusIconContainer" style={{ width: tabKind === ReactTabKind.Home ? 0 : 18 }}>
|
<span
|
||||||
{useObservable(tab?.isExecutionError || ko.observable(false)) && <ErrorIcon tab={tab} active={active} />}
|
className="contentWrapper"
|
||||||
{isTabExecuting(tab, tabKind) && (
|
onClick={() => {
|
||||||
<img className="loadingIcon" title="Loading" src={loadingIcon} alt="Loading" />
|
if (tab) {
|
||||||
)}
|
tab.onTabClick();
|
||||||
{isQueryErrorThrown(tab, tabKind) && (
|
} else if (tabKind !== undefined) {
|
||||||
<img
|
useTabs.getState().activateReactTab(tabKind);
|
||||||
src={errorQuery}
|
}
|
||||||
title="Error"
|
}}
|
||||||
alt="Error"
|
onKeyPress={({ nativeEvent: e }) => {
|
||||||
style={{ marginTop: 4, marginLeft: 4, width: 10, height: 11 }}
|
if (tab) {
|
||||||
/>
|
tab.onKeyPressActivate(undefined, e);
|
||||||
)}
|
} else if (tabKind !== undefined) {
|
||||||
|
onKeyPressReactTab(e, tabKind);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
title={useObservable(tab?.tabPath || ko.observable(""))}
|
||||||
|
aria-selected={active}
|
||||||
|
aria-expanded={active}
|
||||||
|
aria-controls={tabId}
|
||||||
|
tabIndex={0}
|
||||||
|
role="tab"
|
||||||
|
ref={focusTab}
|
||||||
|
>
|
||||||
|
<span className="statusIconContainer" style={{ width: tabKind === ReactTabKind.Home ? 0 : 18 }}>
|
||||||
|
{useObservable(tab?.isExecutionError || ko.observable(false)) && <ErrorIcon tab={tab} active={active} />}
|
||||||
|
{isTabExecuting(tab, tabKind) && (
|
||||||
|
<img className="loadingIcon" title="Loading" src={loadingIcon} alt="Loading" />
|
||||||
|
)}
|
||||||
|
{isQueryErrorThrown(tab, tabKind) && (
|
||||||
|
<img
|
||||||
|
src={errorQuery}
|
||||||
|
title="Error"
|
||||||
|
alt="Error"
|
||||||
|
style={{ marginTop: 4, marginLeft: 4, width: 10, height: 11 }}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
<span className="tabNavText">{useObservable(tab?.tabTitle || getReactTabTitle())}</span>
|
||||||
</span>
|
</span>
|
||||||
<span className="tabNavText">{useObservable(tab?.tabTitle || getReactTabTitle())}</span>
|
|
||||||
<span className="tabIconSection">
|
<span className="tabIconSection">
|
||||||
<CloseButton tab={tab} active={active} hovering={hovering} tabKind={tabKind} />
|
<CloseButton tab={tab} active={active} hovering={hovering} tabKind={tabKind} />
|
||||||
</span>
|
</span>
|
||||||
|
@ -280,7 +284,7 @@ function TabPane({ tab, active }: { tab: Tab; active: boolean }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const onKeyPressReactTab = (e: KeyboardEvent, tabKind: ReactTabKind): void => {
|
const onKeyPressReactTab = (e: KeyboardEvent, tabKind: ReactTabKind): void => {
|
||||||
if (e.key === "Enter" || e.key === "Space") {
|
if (e.key === "Enter" || e.code === "Space") {
|
||||||
useTabs.getState().activateReactTab(tabKind);
|
useTabs.getState().activateReactTab(tabKind);
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue