Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_sdk_framework
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Manos Chorianopoulos
2025-02-05 15:34:06 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
384747715ba97e57d0b3865c9190ddec1a8a8645
38474771
1 parent
59a33a50
ShareViewController accessibilitues
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
0 deletions
SwiftWarplyFramework/SwiftWarplyFramework/NumberPopupViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/ShareViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/NumberPopupViewController.swift
View file @
3847477
...
...
@@ -82,6 +82,8 @@ protocol NumbersPopupDelegate {
// self.tableView.reloadData()
self
.
tableView
.
invalidateIntrinsicContentSize
()
self
.
headerLabel
.
text
=
self
.
headerText
setupAccessibilty
()
}
func
setupScreens
()
{
...
...
@@ -124,6 +126,17 @@ protocol NumbersPopupDelegate {
// return UIModalPresentationStyle.none
}
// MARK: - functions
func
setupAccessibilty
()
{
headerLabel
.
isAccessibilityElement
=
true
headerLabel
.
accessibilityTraits
=
.
header
closeButton
.
isAccessibilityElement
=
true
closeButton
.
accessibilityLabel
=
"Κλείσιμο"
closeButton
.
accessibilityHint
=
"Διπλό πάτημα για κλείσιμο"
closeButton
.
accessibilityTraits
=
.
button
}
// MARK: - UIButton Action
@IBAction
func
closeButtonAction
(
_
sender
:
Any
)
{
self
.
dismiss
(
animated
:
true
,
completion
:
{
...
...
@@ -154,6 +167,7 @@ extension NumberPopupViewController: UITableViewDelegate, UITableViewDataSource{
let
isLast
=
indexPath
.
row
==
(
self
.
numbersList
.
count
-
1
)
cell
.
configureCell
(
number
:
numbersList
[
indexPath
.
row
],
isLast
:
isLast
)
cell
.
accessibilityHint
=
"Διπλό πάτημα για επιλογή"
return
cell
}
...
...
SwiftWarplyFramework/SwiftWarplyFramework/ShareViewController.swift
View file @
3847477
...
...
@@ -53,6 +53,9 @@ import SwiftEventBus
setBackButton
()
setNavigationTitle
(
"Δώρισέ το"
)
// Temporarily disable the table view's accessibility to prevent immediate focus shift
self
.
mainView
.
accessibilityElementsHidden
=
true
backgroundImage
.
image
=
UIImage
(
named
:
"coupons_scrollview_white"
,
in
:
MyEmptyClass
.
resourceBundle
(),
compatibleWith
:
nil
)
// scrollView.clipsToBounds = true
...
...
@@ -117,6 +120,7 @@ import SwiftEventBus
// redeemButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true
// }
setupAccessibilty
()
}
public
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
...
...
@@ -127,6 +131,19 @@ import SwiftEventBus
self
.
navigationController
?
.
hideHairline
()
}
public
override
func
viewDidAppear
(
_
animated
:
Bool
)
{
super
.
viewDidAppear
(
animated
)
// DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
UIAccessibility
.
post
(
notification
:
.
screenChanged
,
argument
:
self
.
navigationItem
.
titleView
)
// }
// Re-enable table view accessibility after the announcement
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1.0
)
{
self
.
mainView
.
accessibilityElementsHidden
=
false
}
}
deinit
{
NotificationCenter
.
default
.
removeObserver
(
self
)
}
...
...
@@ -156,6 +173,22 @@ import SwiftEventBus
}
// MARK: - Functions
func
setupAccessibilty
()
{
couponImage
.
isAccessibilityElement
=
true
couponImage
.
accessibilityLabel
=
"Φωτογραφία εκπτωτικού κουπονιού"
couponImage
.
accessibilityTraits
=
.
image
senderButton
.
isAccessibilityElement
=
true
senderButton
.
accessibilityLabel
=
(
senderLabel
.
text
??
"Αποστολέας"
)
+
": "
+
selectedNumber
senderButton
.
accessibilityHint
=
"Διπλό πάτημα για άνοιγμα"
senderButton
.
accessibilityTraits
=
.
button
redeemButton
.
isAccessibilityElement
=
true
redeemButton
.
accessibilityLabel
=
redeemButton
.
title
(
for
:
.
normal
)
redeemButton
.
accessibilityHint
=
"Διπλό πάτημα για άνοιγμα"
redeemButton
.
accessibilityTraits
=
.
button
}
func
showSpinner
()
{
// add the spinner view controller
// addChild(spinner)
...
...
@@ -379,6 +412,8 @@ extension ShareViewController: NumbersPopupDelegate {
selectedNumber
=
option
senderLabel
.
text
=
option
senderLabel
.
textColor
=
UIColor
(
red
:
0.13
,
green
:
0.13
,
blue
:
0.13
,
alpha
:
1.00
)
senderButton
.
accessibilityLabel
=
"Αποστολέας: "
+
selectedNumber
}
}
...
...
Please
register
or
login
to post a comment