From 74d3cfbba07eb7033e052317f3c806fcde13a256 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Fri, 25 Sep 2020 19:03:12 +0200 Subject: [PATCH] stages/otp_time: show OTP URI as aria-label --- passbook/stages/otp_time/stage.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/passbook/stages/otp_time/stage.py b/passbook/stages/otp_time/stage.py index 039cc8e0e..bd557cc66 100644 --- a/passbook/stages/otp_time/stage.py +++ b/passbook/stages/otp_time/stage.py @@ -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'
{force_str(svg_image)}
' + return sr_wrapper def get(self, request: HttpRequest, *args, **kwargs) -> HttpResponse: user = self.executor.plan.context.get(PLAN_CONTEXT_PENDING_USER)