stages/otp_time: show OTP URI as aria-label
This commit is contained in:
parent
d278acb83b
commit
74d3cfbba0
|
@ -35,7 +35,9 @@ class OTPTimeStageView(FormView, StageView):
|
|||
"""Get QR Code SVG as string based on `device`"""
|
||||
qr_code = QRCode(image_factory=SvgFillImage)
|
||||
qr_code.add_data(device.config_url)
|
||||
return force_str(tostring(qr_code.make_image().get_image()))
|
||||
svg_image = tostring(qr_code.make_image().get_image())
|
||||
sr_wrapper = f'<div aria-label="{device.config_url}">{force_str(svg_image)}</div>'
|
||||
return sr_wrapper
|
||||
|
||||
def get(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
|
||||
user = self.executor.plan.context.get(PLAN_CONTEXT_PENDING_USER)
|
||||
|
|
Reference in New Issue