mirror of
https://github.com/electron/electron.git
synced 2026-01-27 00:09:09 -05:00
feat: improve TouchBarButton accessibility (#20454)
This commit is contained in:
committed by
John Kleinschmidt
parent
8da9a3c416
commit
c16a186de0
@@ -363,6 +363,10 @@ static NSString* const ImageScrubberItemIdentifier = @"scrubber.image.item";
|
||||
button.bezelColor = nil;
|
||||
}
|
||||
|
||||
std::string accessibilityLabel;
|
||||
settings.Get("accessibilityLabel", &accessibilityLabel);
|
||||
button.accessibilityLabel = base::SysUTF8ToNSString(accessibilityLabel);
|
||||
|
||||
std::string label;
|
||||
settings.Get("label", &label);
|
||||
button.title = base::SysUTF8ToNSString(label);
|
||||
@@ -405,6 +409,10 @@ static NSString* const ImageScrubberItemIdentifier = @"scrubber.image.item";
|
||||
settings.Get("label", &label);
|
||||
text_field.stringValue = base::SysUTF8ToNSString(label);
|
||||
|
||||
std::string accessibilityLabel;
|
||||
settings.Get("accessibilityLabel", &accessibilityLabel);
|
||||
text_field.accessibilityLabel = base::SysUTF8ToNSString(accessibilityLabel);
|
||||
|
||||
std::string textColor;
|
||||
if (settings.Get("textColor", &textColor) && !textColor.empty()) {
|
||||
text_field.textColor = [self colorFromHexColorString:textColor];
|
||||
|
||||
Reference in New Issue
Block a user